libslug 0.12.0

A Rust Library For Cryptography Intended For Slug20 That Supports X59 Certificate Format and Post-Quantum Cryptography
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use libslug::slugcrypt::internals::encrypt::aes256::*;

fn main() {
    let key = EncryptionKey::generate();

    let data = b"Hello, world!";

    let encrypted = EncryptAES256::encrypt(key.clone(), data).unwrap();
    let decrypted = DecryptAES256::decrypt(key.clone(), encrypted.1, encrypted.0).unwrap();

    assert_eq!(data.to_vec(), decrypted);
}