Crates.io | mx3 |
lib.rs | mx3 |
version | 1.0.1 |
source | src |
created_at | 2021-04-30 21:26:42.500948 |
updated_at | 2022-06-21 18:21:53.762349 |
description | Implementation of the mx3 algorithm providing a bit mixer, pseudo-random number generator, and hash function. |
homepage | |
repository | https://github.com/chfoo/mx3-rs |
max_upload_size | |
id | 391717 |
size | 31,883 |
mx3-rs is a Rust library implementing the mx3 algorithm which provides a bit mixer, pseudo-random number generator, and hash function. This crate implements versions 1, 2, and 3.
The crate is not intended for cryptographically secure purposes.
let mixed_bits = mx3::v3::mix(123456789);
println!("{:x}", mixed_bits);
use rand::prelude::*;
let mut rng = mx3::v3::Mx3Rng::new(123456789);
let random_number = rng.gen::<f64>();
println!("{}", random_number);
let hash_digest = mx3::v3::hash(b"Hello world!", 123456789);
println!("{:x}", hash_digest);
If you have problems or bug fixes, please use the GitHub Issues and Pull Request sections.
Copyright (c) 2021-2022 Christopher Foo. Licensed under the MIT License.