1 unstable release
0.1.0 | Jun 17, 2024 |
---|
#24 in #bidirectional
5KB
117 lines
bidirectional hash
A simple bidrectional hash implementation based on this Psuedo Encrypt algorithm, which is a Feistel network, with support up to 128 bit numbers.
Usage
cargo add bidirectional_hash
use bidirectional_hash::hash;
fn main() {
let x: u64 = 123456789;
let h = hash(x.into()); // Input::U64(x)
assert_eq!(hash(h), x);
}