extendhash is a Rust library to compute hash extensions. Currently only MD5 is supported, but more hash algorithms are planned in the future.
```rust use extendhash::MD5;
let secretdata = "This is a secret!"; let hash = MD5::computehash(secretdata.asbytes()); let secretdatalength = secret_data.len();
// Now we try computing a hash extension, assuming that secret_data
// is not available. We only need hash
and secret_data_length
.
let appendedmessage = "Appended message.";
let combinedhash = MD5::extendhash(hash, secretdatalength, appendedmessage.as_bytes());
// Now we verify that combined_hash
matches the concatenation (note the intermediate
// padding):
let mut combineddata = Vec::
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.