Objective c SSCrypto RSA密钥解密

Objective c SSCrypto RSA密钥解密,objective-c,encryption,cryptography,rsa,sscrypto,Objective C,Encryption,Cryptography,Rsa,Sscrypto,我已使用此URL上的说明创建了RSA密钥: 但是使用SSCrypto框架,我似乎无法解密密钥 有什么想法吗 更新: 我现在有了这个代码: SSCrypto *crypto = [[SSCrypto alloc] initWithPublicKey:self.publicKey]; [crypto setClearTextWithString:self.textField.stringValue]; [crypto verify]; NSString *verifiedKey = [crypto

我已使用此URL上的说明创建了RSA密钥:

但是使用SSCrypto框架,我似乎无法解密密钥

有什么想法吗


更新:

我现在有了这个代码:

SSCrypto *crypto = [[SSCrypto alloc] initWithPublicKey:self.publicKey];
[crypto setClearTextWithString:self.textField.stringValue];
[crypto verify];
NSString *verifiedKey = [crypto clearTextAsString];
NSLog(@"VERIFIED: %@", verifiedKey);

但出于某种原因,它会报告加密的字符串。有什么想法吗?
self.publicKey
目前只是一个测试,每次应用程序重新启动时都会更改。

您不需要解密密钥。解密密钥毫无意义。您无法解密以前加密过的邮件吗?您好,安德鲁。是的,我想解密一条消息,但不确定如何解密。好的,我终于明白你在问“我如何在sscrypto框架中使用rsa密钥”。如中所述,如果您对某些代码有特定问题,则需要发布代码。抱歉-之前完全错过了“Scrypto”。不用担心。我现在来看看。再次感谢谢洛,安德鲁。非常感谢你的链接。我现在有了这个代码:SSCrypto*crypto=[[SSCrypto alloc]initWithPublicKey:self.publicKey];[crypto setClearTextWithString:self.textField.stringValue];[加密验证];NSString*verifiedKey=[crypto clearTextAsString];NSLog(@“已验证:%@”,已验证密钥);但出于某种原因,它会报告加密的字符串。有什么想法吗?self.publicKey目前只是一个测试,每次应用程序重新启动时都会更改。