首先,您可以
// Generate an array with Public and Private keys of 2048 bits.
NSArray *keys = [[RSAWrapper sharedInstance] generate:2048];
来生成 RSA 密钥对
NSString *encrypted = [[RSAWrapper sharedInstance] encrypt:@"HelloCrypper" withPublicKeyAsBase64:[keys objectAtIndex:0]];
加密一个消息
NSString *message = [[RSAWrapper sharedInstance] decrypt:encrypted withPrivateKeyAsBase64:[keys objectAtIndex:1]];
作者
许可