libcipher 0.1.4

A Rust implementation of the Advanced Encryption Standard (AES) for secure data encryption and decryption.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use libcipher::{Algorithm, Mode, Cipher};

#[test]
fn test_encrypt_aes() {
    let data = b"Hello, World!";
    let cipher = Cipher::new(
        Algorithm::AES,
        Mode::CBC,
        vec![0; 16],
        Some(vec![0; 16]),
    ).unwrap();

    let encrypted_data = cipher.encrypt(data);
    assert!(!encrypted_data.is_empty(), "Encryption failed, data is empty");
}