serde/
example_run.rs

1extern crate b2sum_rust;
2use b2sum_rust::Blake2bSum;
3
4fn main(){
5    // Creates a new File Instance
6    let context = Blake2bSum::new(64);
7    
8    // Outputs a Hexadecimal String
9    let hash = context.read("example_file.txt");
10
11    // Converts the hexadecimal string to a vector of bytes
12    let _bytes = Blake2bSum::as_bytes(&hash);
13
14    // Prints The Hexadecimal Representation
15    println!("Hash: {}",hash);
16
17    // Asserts That These Are Equal
18    assert_eq!(hash,"33B20D15383F97EB46D4FA69442596170CCA01008963A7D0E47210C33AEEF991C78323850C012550C227954A40B3D7AD612568ABC73DB9233FAB9EA4F002B0CB");
19}