简体   繁体   中英

Generate SecKeyRef from base64 RSA public key

I have looked at other answers on StackOverflow and I didn't find what I was looking for. I have a public RSA key in Base64 format generated by some other system. It is in x509 format and the encryption is 512 bits strong.

I need to create a SecKeyRef in order to use an encrypt some data and send back home. (for all purposes the public key is sent from the server side)

I can't find anything on the web that helps me in this situation, all other examples and answers by-pass the problem. I can't create a PEM or DER files or use any other 'tricks', Base64 -> SecKeyRef nothing less.

I know this is a hard one so thank you all for helping.

ps this is for a framework and not an app.

I have found this amazing GitHub project which helped me a lot!

https://github.com/ideawu/Objective-C-RSA

I hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM