GithubHelp home page GithubHelp logo

dmytriigolovanov / swift-rsa-key-loader Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 11 KB

Swift RSA Key Loader

License: MIT License

Swift 79.67% Ruby 20.33%
swift rsa pem loader key privatekey publickey rsa-key rsa-key-pair rsa-keys

swift-rsa-key-loader's Introduction

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. File โ†’ Add 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.

swift-rsa-key-loader's People

Contributors

dmytriigolovanov avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

yegorshkov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.