bidirectional_hash

Crates.iobidirectional_hash
lib.rsbidirectional_hash
version0.1.0
sourcesrc
created_at2024-06-17 03:03:25.867214
updated_at2024-06-17 03:03:25.867214
descriptionA simple implementation of a bidirectional hash function using a Feistel network.
homepage
repositoryhttps://gitlab.com/magicfoodhand/bidirectional_hash
max_upload_size
id1273978
size5,180
(inapinch-io)

documentation

README

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);
}
Commit count: 1

cargo fmt