const-ciphers

Crates.ioconst-ciphers
lib.rsconst-ciphers
version0.0.5
created_at2024-12-18 08:29:27.070471+00
updated_at2024-12-18 10:03:37.42888+00
descriptionCiphers implemented as constant expressions in Rust for use in payload generation. Not for regular use.
homepagehttps://github.com/tur11ng/const-ciphers
repositoryhttps://github.com/tur11ng/const-ciphers
max_upload_size
id1487314
size41,841
Theodoros Symeonidis (tur11ng)

documentation

README

Const ciphers

Installation

cargo add const-ciphers

Usage

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);
}

Disclaimer

⚠️ Caution
Not for cryptographic use. No cryptographic properties guaranteed. Only use for payload generation.
Commit count: 16

cargo fmt