0

Is there a way to RSA encrypt a String using a base64 public key without using a third party library. The key generation is happening on server side. Please help me.

as diu
  • 1,010
  • 15
  • 31
  • 1
    See https://digitalleaves.com/blog/2015/10/asymmetric-cryptography-in-swift/ and https://github.com/TakeScoop/SwiftyRSA for an example – nathan Aug 25 '17 at 03:21
  • @JamesKPolk could you provide any relevant links or code that could point me in that direction? – as diu Aug 25 '17 at 03:26
  • 1
    It is hard to help you; Since you don't want to use a 3rd party-library, I assume that you don't want open source code as it may be "encumbered". Any code that you get from here or from an open source project is effectively the same as using a 3rd party library. You can look at SwiftyRSA if you aren't worried about code encumbrance, but you may as well just include the framework and get the benefit of code that is being maintained. – Paulw11 Aug 25 '17 at 03:28
  • try this https://stackoverflow.com/questions/45837134/how-to-encrypt-and-decrypt-a-stringplain-text-with-rsa-public-key-in-ios-swif – caldera.sac Aug 25 '17 at 10:07

0 Answers0