Latest 1.0.0
Homepage https://github.com/mohakshah/MiniLockCore
License MIT
Platforms ios 8.0
Dependencies libsodium, libb2s, libbase58, ObjectMapper
Authors

CI Status
Version
License
Platform

About

The library is an implementation of miniLock’s core functionalities in Swift. It provides a modern Swift API to miniLock tasks such as user key management, file encryption, decryption, etc. There are also methods which allow encrypting data from memory and decrypting data to memory to completely avoid writing plain text to the disk. It was originally written for the SwiftLock app, but it can be used as a plugin component in any other app wanting to use miniLock’s modern and future-proof encryption scheme.

Requirements

v1.x requires Xcode 9+. For Xcode 8, use the v0.9.x.
Although the code is not written to be iOS dependent, 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", '~> 1.0'

Usage

Generate 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.

Latest podspec

{
    "name": "MiniLockCore",
    "version": "1.0.0",
    "summary": "Swift implementation of miniLock's core functionalities.",
    "description": "The library is an implementation of miniLock's core functionalities in Swift.nIt provides a modern Swift API to miniLock tasks such as user key management,nfile encryption, decryption, etc. There are also methods which allow encryptingndata from memory and decrypting data to memory to completely avoid writingnplain text to the disk. It was originally written for the SwiftLock app on iOS,nbut it can be used as a plugin component in any other app wanting to usenminiLock's modern and future-proof encryption scheme.",
    "homepage": "https://github.com/mohakshah/MiniLockCore",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Mohak Shah": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mohakshah/MiniLockCore.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MiniLockCore/Classes/**/*",
    "dependencies": {
        "libsodium": [
            "~> 1.0"
        ],
        "libb2s": [
            "~> 1.0"
        ],
        "libbase58": [
            "~> 0.1"
        ],
        "ObjectMapper": [
            "~> 3.0"
        ]
    }
}

Pin It on Pinterest

Share This