CryptoKitCLI

Take Apple CryptoKit to the command line and perform cryptographic operations securely and efficiently.

Twitter Swift License Swift Package Manager Swift Action Coverage Documentation

๐ŸŒŸ Features

โœ… Create or validate UUID (universally unique value).

โœ… Perform cryptographically secure hashing (SHA-2 hash with 512, 384 or 256-bit digest).

โœ… Create or validate HMAC (hash message authentication).

โœ… Crypt and decrypt using AES-GCM cipher.

โœ… Crypt and decrypt using ChaCha20-Poly1305 cipher.

โœ… Symmetric key auto-hash to SHA-256 if needed.

๐Ÿšง X25519 key agreement and ed25519 signatures.

๐Ÿšง NIST P-521 signatures and key agreement.

๐Ÿšง NIST P-384 signatures and key agreement.

๐Ÿšง NIST P-256 signatures and key agreement.

๐Ÿ’ Usage

Simply run:

$ cryptokit [subcommand]

Subcommands

UUID

$ cryptokit uuid

SHA-2 Hashing

$ cryptokit hash

HMAC

$ cryptokit hmac

AES-GCM

$ cryptokit aes

ChaCha20-Poly1305

$ cryptokit poly

๐Ÿ›  Compatibility

โš™๏ธ Installation

Thereโ€™re more than one way to install CryptoKitCLI.

Using Homebrew:

$ brew install alexruperez/CryptoKitCLI/formula

Using Mint:

$ mint install alexruperez/CryptoKitCLI

Compiling from source:

Make sure Xcode 11.4+ is installed first.

$ git clone https://github.com/alexruperez/CryptoKitCLI.git
$ cd CryptoKitCLI
$ make install

With that installed and in the /usr/local/bin folder, now itโ€™s ready to serve.

Using Swift Package Manager:

Use as CLI

$ git clone https://github.com/alexruperez/CryptoKitCLI.git
$ cd CryptoKitCLI
$ swift run

Use as dependency

Add the following to your Package.swift fileโ€™s dependencies:

.package(url: "https://github.com/alexruperez/CryptoKitCLI.git", from: "0.1.0")

And then import wherever needed: import CryptoKitCLI

For more information, see the Swift Package Manager documentation.

๐Ÿป Etc.

๐Ÿ‘จโ€๐Ÿ’ป Author

Alex Rupรฉrez โ€“ @alexruperez โ€“ me@alexruperez.com

๐Ÿ‘ฎโ€โ™‚๏ธ License

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