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
🕓 1 year ago
.package(url: "https://github.com/dmytriigolovanov/swift-rsa-key-loader.git", from: "v1.2.0")

Swift RSA Key Loader


  • iOS 9.0+


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:
  1. Set the Dependency Rule to Up to Next Major Version
  2. Add Package


  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 {
let fileName = "rsa_file_name"

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

Supported file formats

Version PEM
1.0.0 +


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


Stars: 1
Last commit: 1 year ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Release v1.2.0
1 year ago
  • Edit load algorithm

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