Upgrade dependencies

master
Jonas Platte 4 years ago
parent f505c0951a
commit f9c4ba2966
No known key found for this signature in database
GPG Key ID: 9D5B897BFF66575C
  1. 8
      Cargo.toml
  2. 4
      src/enums.rs

@ -15,8 +15,8 @@ categories = [
license = "MIT"
[dependencies]
rand = "0.7"
rand = "0.8"
hex = "0.4"
sha2 = "0.8"
md-5 = "0.8"
digest = "0.8"
sha2 = "0.9"
md-5 = "0.9"
digest = "0.9"

@ -37,8 +37,8 @@ impl Algorithm {
AlgorithmType::SHA2_512_256 => Box::new(Sha512Trunc256::new()),
};
hash.input(bytes);
hex::encode(hash.result())
hash.update(bytes);
hex::encode(hash.finalize())
}
/// Calculate a hash of string's bytes using the selected algorithm

Loading…
Cancel
Save