We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdf1d83 commit 9740715Copy full SHA for 9740715
src/dhke.rs
@@ -18,7 +18,7 @@ use zeroize::{Zeroize, ZeroizeOnDrop};
18
use crate::keys::PublicKey;
19
20
/// The result of a Diffie-Hellman key exchange
21
-#[derive(PartialEq, Eq, Zeroize, ZeroizeOnDrop)]
+#[derive(Zeroize, ZeroizeOnDrop)]
22
pub struct DiffieHellmanSharedSecret<P>(P)
23
where P: PublicKey;
24
@@ -52,6 +52,16 @@ where P: PublicKey
52
}
53
54
55
+impl<P> Eq for DiffieHellmanSharedSecret<P> where P: PublicKey {}
56
+
57
+impl<P> PartialEq for DiffieHellmanSharedSecret<P>
58
+where P: PublicKey
59
+{
60
+ fn eq(&self, other: &Self) -> bool {
61
+ self.0.ct_eq(&other.0).into()
62
+ }
63
+}
64
65
#[cfg(test)]
66
mod test {
67
use rand_core::OsRng;
0 commit comments