djb33 0.3.0

DJB33 hash algorithm write in Rust.
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 2 items with examples
  • Size
  • Source code size: 5.14 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.16 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • shixiongfei/djb33-rs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jenson-shi

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