6 releases
Uses new Rust 2024
new 0.3.1 | Apr 21, 2025 |
---|---|
0.3.0 | Apr 17, 2025 |
0.2.1 | Apr 17, 2025 |
0.2.0 | Mar 21, 2023 |
0.1.0 | Jun 3, 2022 |
#1682 in Cryptography
1,671 downloads per month
Used in 6 crates
135KB
473 lines
Usage (Hashing)
use ascon_hash::{AsconHash256, Digest};
let mut hasher = AsconHash256::new();
hasher.update(b"some bytes");
let digest = hasher.finalize();
assert_eq!(&digest[..], b"\xe9\x09\xc2\xf6\xda\x9c\xb3\x02\x84\x23\x26\x5c\x8f\x23\xfc\x2d\x26\xbf\xc0\xf3\xdb\x70\x46\x83\xef\x16\xb7\x87\xa9\x45\xed\x68");
Usage (XOF)
use ascon_hash::{AsconXof128, ExtendableOutput, Update, XofReader};
let mut xof = AsconXof128::default();
xof.update(b"some bytes");
let mut reader = xof.finalize_xof();
let mut dst = [0u8; 5];
reader.read(&mut dst);
assert_eq!(&dst, b"\x8c\x7d\xd1\x14\xa0");
Ascon hashes
Pure Rust implementation of the lightweight cryptographic hash function AsconHash256 and the extendable output functions (XOF) AsconXOF128.
Security Notes
No security audits of this crate have ever been performed.
USE AT YOUR OWN RISK!
Minimum Supported Rust Version
This crate requires Rust 1.85 at a minimum.
License
Licensed under either of:
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~495–720KB
~18K SLoC