diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-07-02 17:47:41 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-07-02 19:02:15 +0200 |
commit | 679b3631aa40663bd23778fc4776c3da8ba3cef0 (patch) | |
tree | 7fcf1bc3a3a34e33ac89fa4bb7ba2d45d1fb59a8 /openpgp/src/parse | |
parent | 852890aac0c1db5e249e584666c056a2d9aa41ae (diff) |
openpgp: Use the hash abstraction for hashing.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/mpis.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/openpgp/src/parse/mpis.rs b/openpgp/src/parse/mpis.rs index d5c7c455..b20f11c8 100644 --- a/openpgp/src/parse/mpis.rs +++ b/openpgp/src/parse/mpis.rs @@ -152,8 +152,6 @@ impl mpis::SecretKey { -> Result<Self> { use std::io::Cursor; use serialize::Serialize; - use nettle::Hash; - use nettle::hash::insecure_do_not_use::Sha1; // read mpis let bio = buffered_reader::Generic::with_cookie( @@ -168,7 +166,7 @@ impl mpis::SecretKey { // compute sha1 hash mpis.serialize(&mut cur)?; let buf = cur.into_inner(); - let mut hsh = Sha1::default(); + let mut hsh = HashAlgorithm::SHA1.context().unwrap(); hsh.update(&buf); let mut our_chksum = [0u8; 20]; |