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!".asbytes(); let hash = MD5::computehash(secretdata); 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.".asbytes();
let combinedhash = MD5::extendhash(
hash, secretdatalength, appended_message);
// 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.