网络:RSA 加密
来源:互联网 发布:行知职高厨师学费 编辑:程序博客网 时间:2024/06/10 06:53
#import "ViewController.h"#import "CryptorTools.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib.}- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { CryptorTools *tool = [[CryptorTools alloc]init]; NSString *privateKey = [[NSBundle mainBundle]pathForResource:@"p.p12" ofType:nil]; NSString *publicKey = [[NSBundle mainBundle]pathForResource:@"rsacert.der" ofType:nil]; // 加载私钥 [tool loadPrivateKey:privateKey password:@"123456"]; // 加载公钥 [tool loadPublicKeyWithFilePath:publicKey]; // 加密 NSString *result = [tool RSAEncryptString:@"itcast"]; NSLog(@"rsa加密结果 %@",result); // 解密 NSString *result1 = [tool RSADecryptString:result]; NSLog(@"rsa解密结果 %@",result1);}@end
0 0
- 网络:RSA 加密
- RSA加密
- rsa 加密
- RSA加密
- RSA加密
- RSA加密
- RSA加密
- RSA 加密
- RSA 加密
- rsa加密
- RSA加密
- RSA加密
- RSA加密
- RSA加密
- RSA加密
- RSA加密
- RSA加密
- RSA加密
- 网络:对称加密
- 初步认识Highcharts
- android-pulltorefresh设置header的问题
- codeforces 618F
- 用户登陆设计
- 网络:RSA 加密
- UIView中的坐标转换
- 深入理解 Java中的 流 (Stream)
- hdu Magic maze bfs+优先队列 解题报告
- 协议之浅谈
- AFNetworking 源代码分析
- Android API Guides---APP Manifest <receiver> <service>
- Win7如何设置多个IP地址
- linux连接windows