Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我有一个包含公钥的证书,我想在 iPhone SDK 编程中从中获取公钥,并使用公钥通过 RSA 加密字符串。我应该怎么办?
SecKeyRef publicKeyReference = NULL; NSMutableDictionary* queryPublicKey; SecItemCopyMatching((CFDictionaryRef)queryPublicKey, (CFTypeRef *)&publicKeyReference);
publicKeyReference - 是您的公钥表示;queryPublicKey - 是您的证书表示;SecItemCopyMatching - 允许您从证书中检索公钥的功能!