简体   繁体   English

从base64 RSA公钥生成SecKeyRef

[英]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. 我在StackOverflow上查看了其他答案,但我找不到我要找的东西。 I have a public RSA key in Base64 format generated by some other system. 我有一个其他系统生成的Base64格式的公共RSA密钥。 It is in x509 format and the encryption is 512 bits strong. 它采用x509格式,加密强度为512位。

I need to create a SecKeyRef in order to use an encrypt some data and send back home. 我需要创建一个SecKeyRef,以便使用加密一些数据并发送回家。 (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. 我无法创建PEM或DER文件或使用任何其他'技巧', Base64 - > SecKeyRef

I know this is a hard one so thank you all for helping. 我知道这很难,所以谢谢大家的帮助。

ps this is for a framework and not an app. ps这是一个框架,而不是一个应用程序。

I have found this amazing GitHub project which helped me a lot! 我找到了这个惊人的GitHub项目给了我很多帮助

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

I hope this helps! 我希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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