| Crates.io | const-ciphers |
| lib.rs | const-ciphers |
| version | 0.0.5 |
| created_at | 2024-12-18 08:29:27.070471+00 |
| updated_at | 2024-12-18 10:03:37.42888+00 |
| description | Ciphers implemented as constant expressions in Rust for use in payload generation. Not for regular use. |
| homepage | https://github.com/tur11ng/const-ciphers |
| repository | https://github.com/tur11ng/const-ciphers |
| max_upload_size | |
| id | 1487314 |
| size | 41,841 |
cargo add const-ciphers
use const-ciphers::{AesConst, AesMode};
const fn example() {
let plaintext = [0u8; 32];
let key = [0xFF; 16];
let iv = [0x00; 16];
let mode = AesMode::CBC { iv };
let encrypted = AesConst::encrypt(&plaintext, &key, &mode);
let decrypted = AesConst::decrypt(&encrypted, &key, &mode);
}