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 password").expect("Failed to encrypt");
// Decrypting
use simple_crypt::decrypt;
let data = decrypt(&encrypted_data, b"example password").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 a directory and extracts it to the specified output directory
Decrypts file data and output it to the specified output file
Encrypts some data and returns the result
Encrypts a directory and outputs it to the specified output file
Encrypts file data and outputs it to the specified output file