sponge-hash-aes256 1.0.0

A sponge-based secure hash function that uses AES-256 as its internal PRF
Documentation

SpongeHash-AES256

A sponge-based secure hash function that uses AES-256 as its internal PRF.

This hash function has a variable output size and can produce outputs of any size up to 16,384 (inclusive) bits.

Please see the documentation for details! 💡

Installation

In order to use this crate, you have to add it under [dependencies] to your Cargo.toml:

[dependencies]
sponge-hash-aes256 = "1.0.0"

Usage

Here is a simple example that demonstrates how to use SpongeHash-AES256 in your code:

use sponge_hash_aes256::{DEFAULT_DIGEST_SIZE, SpongeHash256};

fn main() {
    // Create new hash instance
    let mut hash = SpongeHash256::new();

    // Process message
    hash.update(b"The quick brown fox jumps over the lazy dog");

    // Retrieve the final digest
    let digest = hash.digest::<DEFAULT_DIGEST_SIZE>();

    // Print result
    println!("{:02X?}", &digest);
}

License

This software is released under the BSD Zero Clause (“0BSD”) License.

Copyright (C) 2025 by LoRd_MuldeR <mulder2@gmx.de>