标签:
<<这里只是根据个人项目实施通过的总结 具体原理不解释
1. RSA
RSA加密算法是最常用的非对称加密算法
公钥解密
#define kRSAPublicKey @"-----BEGIN PUBLIC KEY-----\nXXXXXXX\n-----END PUBLIC KEY-----"
+ (NSString *)rsaEncryptStr:(NSString *)keyStr{
SCRSA *enRSA = [[SCRSA alloc] initWithKeyContent:kRSAPublicKey keyType:KeyTypePublic];
NSString *enTxt = [enRSA encryptByRsa:keyStr];
return enTxt;
}
资源地址: http://pan.baidu.com/s/1c070EUO
2. AES-128-CBC
转自: http://www.itqx.net/thread-823-1-1.html
http://pan.baidu.com/s/1dD6cISp
标签:
原文地址:http://www.cnblogs.com/lee4519/p/4304976.html