GithubHelp home page GithubHelp logo

mezhevikin / aes-everywhere-swift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mervick/aes-everywhere-swift

0.0 0.0 0.0 12 KB

AES Everywhere - Swift implementation

Home Page: https://github.com/mervick/aes-everywhere

License: Other

Ruby 15.19% Swift 84.81%

aes-everywhere-swift's Introduction

AES Everywhere - Cross Language Encryption Library

AES Everywhere is Cross Language Encryption Library which provides the ability to encrypt and decrypt data using a single algorithm in different programming languages and on different platforms.

This is an implementation of the AES algorithm, specifically CBC mode, with 256 bits key length and PKCS7 padding. It implements OpenSSL compatible cryptography with random generated salt

Swift implementation

Swift implementation uses BlueCryptor which provides swift cross-platform crypto library derived from IDZSwiftCommonCrypto. On macOS and iOS, BlueCryptor uses the Apple provided CommonCrypto library. On Linux, it uses libcrypto from the OpenSSL project.

Current repo is a part of AES-everywhere project separated due to the requirements of Swift Package Manager

Including in your project

Using Swift Package Manager:
In your Package.swift add dependency to github url

  dependencies: [
    .package(url: "https://github.com/mervick/aes-everywhere-swift.git", from: "1.2.0")
  ],

and in target dependencies add "AesEverywhere":

  targets: [
    .target(
      name: "your-project-name",
      dependencies: [
        "AesEverywhere"
      ])
  ]

Using Carthage:

To include AesEverywhere in a project using Carthage, add a line to your Cartfile:

  github "mervick/aes-everywhere-swift" ~> 1.2

Using CocoaPods:

@TODO: publish pod, add docs

Usage

import AesEverywhere

let crypted = try! AES256.encrypt(input: "TEST", passphrase: "PASS")
print(crypted)

let decrypted = try! AES256.decrypt(input: crypted, passphrase: "PASS")
print(decrypted)

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.