Crates.io | djb33 |
lib.rs | djb33 |
version | 0.3.0 |
source | src |
created_at | 2016-06-01 15:00:50.21928 |
updated_at | 2017-07-15 17:15:01.034537 |
description | DJB33 hash algorithm write in Rust. |
homepage | https://github.com/jenson-shi/djb33-rs |
repository | https://github.com/jenson-shi/djb33-rs.git |
max_upload_size | |
id | 5257 |
size | 4,991 |
DJB33 hash algorithm write in Rust
$ cargo run --example djb33-example
Add djb33 via your Cargo.toml
[dependencies]
djb33 = "*"
extern crate djb33;
fn main() {
let s = "HelloWorld.";
let mut h1 = djb33::DJB33_INIT;
h1 = djb33::djb33(h1, s.as_bytes());
let h2 = djb33::djb33_xor(djb33::DJB33_INIT, s.as_bytes());
println!("djb33 {}", h1);
println!("djb33 xor {}", h2);
}
MIT