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§
- decrypt
- Decrypts some data and returns the result
- decrypt_
directory - Decrypts a directory and extracts it to the specified output directory
- decrypt_
file - Decrypts file data and output it to the specified output file
- encrypt
- Encrypts some data and returns the result
- encrypt_
directory - Encrypts a directory and outputs it to the specified output file
- encrypt_
file - Encrypts file data and outputs it to the specified output file