diff options
-rw-r--r-- | openpgp/src/packet/mdc.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openpgp/src/packet/mdc.rs b/openpgp/src/packet/mdc.rs index 16fdcd7b..5c3544ca 100644 --- a/openpgp/src/packet/mdc.rs +++ b/openpgp/src/packet/mdc.rs @@ -1,4 +1,7 @@ +use std::cmp::Ordering; + use crate::crypto; +use crate::crypto::mem; use crate::packet; use crate::Packet; @@ -67,7 +70,7 @@ impl MDC { // return false. false } else { - self.computed_digest == self.digest + mem::secure_cmp(&self.computed_digest, &self.digest) == Ordering::Equal } } } |