High-level interface for easy calculation of checksum digest for files, directories, stdin and more.
Add the following entry to the dependencies
section of your Cargo.toml
file:
```toml [dependencies]
chksum = "0.2.2" ```
Alternatively, you can use the cargo add
subcommand:
shell
cargo add chksum
Use chksum
function and File
as an input.
```rust use std::fs::File;
use chksum::chksum; use chksum::hash::SHA2_224;
let file = File::open(path)?;
let digest = chksum::
Alternatively use ReadDir
as an input.
```rust use std::fs::read_dir;
use chksum::chksum; use chksum::hash::SHA2_256;
let dir = readdir(path)?;
let digest = chksum::
For more usage examples, refer to the documentation available at docs.rs.
Check chksum-hash
for low-level interface.
MIT