我仍然没有简单的方法来做类似的事情:
NSString *stringForEncrypt = @"Some string";
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
NSData *encryptedData = [data encryptWithPublicKey:public_key];
//....
NSData *decryptedData = [encryptedData decryptWithPrivateKey:private_key];
NSString *decryptedString = [NSString alloc] initWithData:decryptedData encoding:NSUTF8StringEncoding];
BOOL isItWorks = [stringForEncrypt isEqualToString:decryptedString];
我可以仅使用Security.framework来实现它吗?任何人