A simple cryptography library that provides an interface for calculating hash digests using both batch and stream computation.
Add the following entry to the dependencies
section of your Cargo.toml
file:
```toml [dependencies]
chksum-hash = "0.3.0" ```
Alternatively, you can use the cargo add
subcommand:
sh
cargo add chksum-hash
```rust use chksum_hash as hash;
let digest = hash::new(hash::SHA2256) .update("some") .update(b"data") .update([0, 1, 2, 3]) .digest(); asserteq!( digest.tohexlowercase(), "5c3bfbc8614adc72d3ec0e9b15a1fd1c55cee63e34af5a4ff058eb2eef7d8482" ); ```
For more usage examples, refer to the documentation available at docs.rs.
MIT