summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse/parse.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-13 15:35:57 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-13 16:37:02 +0100
commit2dde931854b779562777b8946aa619c86fc821db (patch)
tree6060307277a7e4e0dc58f87f6b97c1b19f3bea0e /openpgp/src/parse/parse.rs
parent5bef82801ced8f754552110959ad6fcfcf94c7ac (diff)
openpgp: Likewise for MDC.
Diffstat (limited to 'openpgp/src/parse/parse.rs')
-rw-r--r--openpgp/src/parse/parse.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index 202041ba..4319df42 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -2029,7 +2029,7 @@ impl MDC {
// Nevertheless, we take some basic precautions to check
// whether it is really the matching HashedReader.
- let mut computed_hash : [u8; 20] = Default::default();
+ let mut computed_digest : [u8; 20] = Default::default();
{
let mut r : Option<&mut dyn BufferedReader<Cookie>>
= Some(&mut php.reader);
@@ -2046,7 +2046,7 @@ impl MDC {
} else {
None
}).unwrap();
- h.digest(&mut computed_hash);
+ h.digest(&mut computed_digest);
}
// If the outer most HashedReader is not the
@@ -2060,10 +2060,10 @@ impl MDC {
}
}
- let mut hash : [u8; 20] = Default::default();
- hash.copy_from_slice(&php_try!(php.parse_bytes("hash", 20)));
+ let mut digest: [u8; 20] = Default::default();
+ digest.copy_from_slice(&php_try!(php.parse_bytes("digest", 20)));
- php.ok(Packet::MDC(MDC::new(hash, computed_hash)))
+ php.ok(Packet::MDC(MDC::new(digest, computed_digest)))
}
}
@@ -3943,7 +3943,7 @@ mod test {
if let PacketParserResult::Some(
PacketParser { packet: Packet::MDC(ref mdc), .. }) = ppr
{
- assert_eq!(mdc.computed_hash(), mdc.hash(),
+ assert_eq!(mdc.computed_digest(), mdc.digest(),
"MDC doesn't match");
}