diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-11-17 16:54:32 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-12-07 16:37:57 +0100 |
commit | d05f6cecbaeda0be9eae6a80517c1839d581545e (patch) | |
tree | 6af2ad42f85b623022056c36d5ffa5ec5e2283e5 /openpgp/src/packet/container.rs | |
parent | 3b88cd1725bdded57c2ff845db5d471d2da63e6a (diff) |
openpgp: Drop hash::Context in favor of a pub trait hash::Digest.
Diffstat (limited to 'openpgp/src/packet/container.rs')
-rw-r--r-- | openpgp/src/packet/container.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/packet/container.rs b/openpgp/src/packet/container.rs index a06d84cc..cb96b85d 100644 --- a/openpgp/src/packet/container.rs +++ b/openpgp/src/packet/container.rs @@ -296,14 +296,14 @@ impl Container { /// Creates a hash context for hashing the body. pub(crate) // For parse.rs - fn make_body_hash() -> hash::Context { + fn make_body_hash() -> Box<dyn hash::Digest> { CONTAINER_BODY_HASH.context() .expect("CONTAINER_BODY_HASH must be implemented") } /// Hashes content that has been streamed. pub(crate) // For parse.rs - fn set_body_hash(&mut self, mut h: hash::Context) { + fn set_body_hash(&mut self, mut h: Box<dyn hash::Digest>) { self.body_digest.resize(h.digest_size(), 0); let _ = h.digest(&mut self.body_digest); } |