Swiftpack.co - dmytriigolovanov/swift-rsa-key-loader as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by dmytriigolovanov.
dmytriigolovanov/swift-rsa-key-loader v1.2.0
Swift RSA Key Loader
⭐️ 1
🕓 2 years ago
iOS
.package(url: "https://github.com/dmytriigolovanov/swift-rsa-key-loader.git", from: "v1.2.0")

Swift RSA Key Loader

Requirements

  • iOS 9.0+

Installation

See the subsections below for details about the different installation methods.

  1. Swift Package Manager

Swift Package Manager

  1. Go to project
  2. FileAdd Packages...
  3. Search for library, using URL:
https://github.com/dmytriigolovanov/swift-rsa-key-loader
  1. Set the Dependency Rule to Up to Next Major Version
  2. Add Package

Using

  1. Import library to needed swift file.
import RSAKeyLoader
  1. Add RSA key file to project (xcodeproj)
  2. Load file with name and file extension (type)

Private Key

let fileName = "rsa_file_name"

do {
  let privateKey = try RSAKeyLoader.loadPrivateKey(fileName: fileName, fileType: .pem)
  // use private key
} catch {
  print(error
}
let fileName = "rsa_file_name"

do {
  let privateKey = try RSAKeyLoader.loadPublicKey(fileName: fileName, fileType: .pem)
  // use public key
} catch {
  print(error
}

Supported file formats

Version PEM
1.0.0 +

License

The contents of this repository are licensed under the MIT License.

GitHub

link
Stars: 1
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Release v1.2.0
2 years ago
  • Edit load algorithm

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics