djb33

Crates.iodjb33
lib.rsdjb33
version0.3.0
sourcesrc
created_at2016-06-01 15:00:50.21928
updated_at2017-07-15 17:15:01.034537
descriptionDJB33 hash algorithm write in Rust.
homepagehttps://github.com/jenson-shi/djb33-rs
repositoryhttps://github.com/jenson-shi/djb33-rs.git
max_upload_size
id5257
size4,991
Xiongfei Shi (jenson-shi)

documentation

README

djb33-rs

DJB33 hash algorithm write in Rust

Run example

$ cargo run --example djb33-example

Installation

Add djb33 via your Cargo.toml

[dependencies]
djb33 = "*"

Usage

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);
}

License

MIT

Commit count: 6

cargo fmt