Is there hava any API of encryption of RSA for mac os

but i had found some API but has no useless : Security transforms only support symmeric encryption and decryption OpenSSL documentation is strongly discouraged. CDSA (including CSSM) is deprecated and should not be used for new development. It is not available in iOS. SecKeyEncrypt function is only used in ios. Common Crypto when i including some error occured. i had acquire publicKey from .cer of microsoft, so i want use publicKey encrypt session key. but there has no avaliable API, so what can i do? thanks in advance!!

Replies

Security transforms only support symmeric encryption and decryption

That’s not correct. You can do RSA encryption and decryption using Security Transforms. Check out the CryptoCompatibility sample code.

Note In macOS 10.12 and iOS 10 we are enhancing the SecKey API so that you’ll have one simple API for asymmetric encryption on both platforms. Yay! For more details, watch WWDC 2016 Session 706 What’s New in Security.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"