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

Documentation Repository

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