Skip to content

Commit f96fcd8

Browse files
committed
Merge #674: Derive Hash for Scalar
f87dc91 Derive Hash for Scalar (Jiri Jakes) Pull request description: Unless there is some safety concern I cannot see, having Scalar implementing Hash would be useful. ACKs for top commit: Kixunil: ACK f87dc91 apoelstra: ACK f87dc91 Tree-SHA512: 276670a3d938fade3828123547b01e38b1a3c56775fb3c545d2c392622de808cf2bf8125925c7896ee27bacd5897d88908384d8c157dc8ec7d605781475964fd
2 parents a771f6c + f87dc91 commit f96fcd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scalar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::constants;
2222
// Internal represenation is big endian to match what `libsecp256k1` uses.
2323
// Also easier to implement comparison.
2424
// Debug impl omitted for now, the bytes may be secret
25-
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
25+
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2626
pub struct Scalar([u8; 32]);
2727
impl_pretty_debug!(Scalar);
2828
impl_non_secure_erase!(Scalar, 0, [0u8; 32]);

0 commit comments

Comments
 (0)