Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/4taras4/RSASwiftGenerator
Util for generation RSA keys on your client and save to keychain or convert into Data 🔑 🔐
https://github.com/4taras4/RSASwiftGenerator
Last synced: about 1 month ago
JSON representation
Util for generation RSA keys on your client and save to keychain or convert into Data 🔑 🔐
- Host: GitHub
- URL: https://github.com/4taras4/RSASwiftGenerator
- Owner: 4taras4
- License: mit
- Created: 2018-01-19T17:13:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T21:45:00.000Z (over 4 years ago)
- Last Synced: 2024-11-24T02:02:18.482Z (about 2 months ago)
- Language: Swift
- Homepage:
- Size: 91.8 KB
- Stars: 21
- Watchers: 4
- Forks: 1
- Open Issues: 2
Awesome Lists containing this project
- awesome-ios - RSASwiftGenerator - Util for generation RSA keys on your client and save to keychain or cover into Data. (Security / Encryption)
- awesome-ios-star - RSASwiftGenerator - Util for generation RSA keys on your client and save to keychain or cover into Data.~~ (Security / Encryption)
README
# RSASwiftGenerator 🔑 🔐
[![CI Status](http://img.shields.io/travis/Tarik/RSASwiftGenerator.svg?style=flat)](https://travis-ci.org/Tarik/RSASwiftGenerator)
[![Version](https://img.shields.io/cocoapods/v/RSASwiftGenerator.svg?style=flat)](http://cocoapods.org/pods/RSASwiftGenerator)
[![License](https://img.shields.io/cocoapods/l/RSASwiftGenerator.svg?style=flat)](http://cocoapods.org/pods/RSASwiftGenerator)
[![Platform](https://img.shields.io/cocoapods/p/RSASwiftGenerator.svg?style=flat)](http://cocoapods.org/pods/RSASwiftGenerator)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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```swift
pod 'RSASwiftGenerator'
```
## Example 💻```swift
import UIKit
import RSASwiftGeneratorclass ViewController: UIViewController {
override func 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) in
print(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) in
print(succes)
}// remove keys from keychain
}```
## Author 👨💻
Tarik, [email protected]
## License
RSASwiftGenerator is available under the MIT license. See the LICENSE file for more info.