diff --git a/src/scalar.rs b/src/scalar.rs index 7ce54524b..77f3e0cc7 100644 --- a/src/scalar.rs +++ b/src/scalar.rs @@ -22,7 +22,7 @@ use crate::constants; // Internal represenation is big endian to match what `libsecp256k1` uses. // Also easier to implement comparison. // Debug impl omitted for now, the bytes may be secret -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct Scalar([u8; 32]); impl_pretty_debug!(Scalar); impl_non_secure_erase!(Scalar, 0, [0u8; 32]);