Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.63 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.63 KB

Mink

[![CI Status](https://img.shields.io/travis/Julius Lundang/Mink.svg?style=flat)](https://travis-ci.org/Julius Lundang/Mink) Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Mink is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Mink', :git => 'https://github.com/cHaLkdusT/Mink'

Usage

Swift

let key = MinkKey(publicKey: "publicKey", privateKey: "privateKey")
let crypto = try? MinkCrypto(key: key)

let encryptedText = try? crypto?.encryptText("plain text")

let decryptedText = try? crypto?.decryptText("encrypted text")

Objective-C

NSString *publicKey = @"publicKey";
NSString *privateKey = @"privateKey";
MinkKey *key = [[MinkKey alloc] initWithPublicKey:publicKey privateKey:privateKey];
NSError *error;
MinkCrypto *crypto = [[MinkCrypto alloc] initWithKey:key error:&error];

NSString *encryptedText = [crypto encryptText:@"plain text" error:&error];

NSString *decryptedText = [crypto decryptText:@"encrypted text"
                                        error:&error];

Author

Julius Lundang, [email protected]

License

Mink is available under the MIT license. See the LICENSE file for more info.