We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17c8751 commit c0ae3e7Copy full SHA for c0ae3e7
src/key.rs
@@ -71,8 +71,7 @@ impl PartialEq for SecretKey {
71
/// This implementation is designed to be constant time to help prevent side channel attacks.
72
#[inline]
73
fn eq(&self, other: &Self) -> bool {
74
- let accum = self.0.iter().zip(&other.0)
75
- .fold(0, |accum, (a, b)| accum | a ^ b);
+ let accum = self.0.iter().zip(&other.0).fold(0, |accum, (a, b)| accum | a ^ b);
76
unsafe { core::ptr::read_volatile(&accum) == 0 }
77
}
78
0 commit comments