Crate simple_crypt
source · [−]Expand description
Simple Crypt
simple_crypt is a high level library to encrypt and decrypt data
For encryption it uses AES-GCM-SIV-256 and Argon2
Usage
add this to Cargo.toml:
simple_crypt = "*"Examples
// Encrypting
use simple_crypt::encrypt;
let encrypted_data = encrypt(b"example text", b"example passowrd").expect("Failed to encrypt");
// Decrypting
use simple_crypt::decrypt;
let data = decrypt(&encrypted_data, b"example passowrd").expect("Failed to decrypt");And there are other functions to encrypt files or folders see the documentation
Functions
Decrypts some data and returns the result
Decrypts file data and output it to the specified output file
Encrypts some data and returns the result
Encrypts file data and output it to the specified output file