btnguyen2k/swift-rsautils

can't we encrypt it without keychainTag

jjpatel1996 opened this issue · 1 comments

can't we encrypt it without keychainTag. i am getting error Error while ecrypting: -50.can you please tell me how can i get same result like objective-c library without or with keychainTag.

Hi @jjpatel1996,

I belive this is restriction of iOS. When you do not supply a keychainTag, the library will generate one for you. However, the generated keychainTag seems no longer work (not sure since which version of iOS/XCode). You have to supply your own tag name, best in the following format:

  • your_app_bundle_id.private for private key
  • your_app_bundle_id.public for public key

Hope it helps.
Cheers,
Thanh Nguyen
P/S: this repo is no longer maintained. New/Updated code is moved to this new one: https://github.com/btnguyen2k/swiftutils