MiniLockCore 1.0.0

MiniLockCore 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2018
SPMSupports SPM

Maintained by Mohak Shah.



 
Depends on:
libsodium~> 1.0
libb2s~> 1.0
libbase58~> 0.1
ObjectMapper~> 3.0
 

  • By
  • Mohak Shah

MiniLockCore

About

The library is a swift implementation of miniLock’s core functionalities. It was originally written for the SwiftLock app, but can be used as a plugin system in any other app wanting to use the modern and future-proof encryption scheme of miniLock.

Requirements

So far, the library has been only tested to work on iOS devices. Testing for macOS, watchOS and tvOS are pending. Any contributions here are welcome.

Installation

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

pod "MiniLockCore", '~> 0.9'

Usage

Generating a user’s keypair:

import MiniLockCore

let keyPair = MiniLock.KeyPair(fromEmail: email, andPassword: password)!

Encrypt a file

do {
    let encryptor = try MiniLock.FileEncryptor(fileURL: urlOfSourceFile,
                                               sender: CurrentUser.keyPair!,
                                               recipients: [recipientId1, recipientId2] )

    let encryptedFileURL = try encryptor.encrypt(destinationDirectory: urlOfDestinationDirectory,
                                                 filename: "foo.miniLock",
                                                 deleteSourceFile: false)
} catch {
    print("Error encrypting:", error)
}

Author

Mohak Shah

License

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