simplestcrypt 0.2.0

Simplest way to perform a symmetric encryption, using a preshared key. Very small wrapper around aes-siv crate, with randomly generated nonces, for anything more advanced, use aes-siv instead
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::str;
fn main() {
    let payload = "Hello world!".as_bytes();
    let password = b"hello wooooooooo";

    println!("Payload: {:?}", payload);
    let encrypted = simplestcrypt::encrypt_and_serialize(&password[..], &payload).unwrap();
    println!("Encrypted: {:?}", encrypted);
    let plain = simplestcrypt::deserialize_and_decrypt(&password[..], &encrypted).unwrap();

    println!("Decrypted: {:?}", &plain);
}