You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements ⚠️
SWIFT 4
XCode 9 +
Installation 📲
RSASwiftGenerator is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'RSASwiftGenerator'
Example 💻
import UIKit
import RSASwiftGenerator
classViewController:UIViewController{overridefunc viewDidLoad(){
super.viewDidLoad()
kRSASwiftGeneratorApplicationTag ="MY.BUNDLE.ID" //setup your id for keychain saving
kRSASwiftGeneratorKeySize =2048 //keySize
// generade new key pair
RSASwiftGenerator.shared.createSecureKeyPair(){(succes,error)inprint(succes,error)}RSASwiftGenerator.shared.keyPairExists() // check keys for exist
RSASwiftGenerator.shared.getPublicKeyData() // get Data refference as public key
RSASwiftGenerator.shared.getPublicKeyReference() // / get SecKey refference for public key
RSASwiftGenerator.shared.getPrivateKeyReference() // get SecKey refference for private key
RSASwiftGenerator.shared.deleteSecureKeyPair(){(succes)inprint(succes)}// remove keys from keychain
}