nutek-cipher-lib 0.1.0

Encrypt and decrypt data using AES-GCM-SIV.
Documentation
  • Coverage
  • 50%
    2 out of 4 items documented2 out of 2 items with examples
  • Size
  • Source code size: 10.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.27 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • buahaha

nutek-cipher-lib

a library for encrypting and decrypting text using the AES-GCM-SIV cipher

Installation

cargo add nutek-cipher-lib

Usage

use nutek_cipher_lib::aes_gcm_siv::encrypt;
use nutek_cipher_lib::aes_gcm_siv::decrypt;

fn main() {
    let key = b"0123456789abcdef0123456789abcdef";
    let nonce = b"123456123456";
    let plaintext = b"Hello, world!";
    let ciphertext = encrypt(plaintext, nonce, key);
    let decrypted = decrypt(key, nonce, &ciphertext).unwrap();
    assert_eq!(plaintext, decrypted);
}

License

non-commercial use only, see LICENSE