shell
cargo add chksum
Chksum
The core of this libary is Chksum
trait which is implemented for various types like &[u8]
, &str
or File
.
In case when you need to implement Chksum
for your trait you will need to use cryptographic primitives which are in chksum::hash
module.
```rust use chksum::prelude::*;
let digest = File::open("path/to/file")?.chksum(HashAlgorithm::MD5)?; println!("digest {:x}", digest); ```