Derive Hash for Scalar

This commit is contained in:
Jiri Jakes 2024-01-18 19:23:31 +08:00
parent a771f6c722
commit f87dc91151
No known key found for this signature in database
GPG Key ID: 01F5B01A5D686F31
1 changed files with 1 additions and 1 deletions

View File

@ -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]);