encrypt

Function encrypt 

Source
pub fn encrypt(data: &[u8], password: &[u8]) -> Result<Vec<u8>>
Expand description

Encrypts some data and returns the result

ยงExamples

use simple_crypt::encrypt;

let encrypted_data = encrypt(b"example text", b"example password").expect("Failed to encrypt");
// and now you can write it to a file:
// fs::write("encrypted_text.txt", encrypted_data).expect("Failed to write to file");