Skip to content

Commit bb428d2

Browse files
[cryptography/bls12381/tle] Add Hash to Ciphertext (#1556)
1 parent 7506324 commit bb428d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cryptography/fuzz/fuzz_targets/sha256_hasher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ fn fuzz_fill_and_format(byte_val: u8) {
118118
assert!(slice.iter().all(|&b| b == byte_val));
119119

120120
// Test Debug and Display formatting
121-
let debug_str = format!("{:?}", digest);
122-
let display_str = format!("{}", digest);
121+
let debug_str = format!("{digest:?}");
122+
let display_str = format!("{digest}");
123123
assert_eq!(debug_str, display_str);
124124
assert_eq!(debug_str.len(), 64); // 32 bytes * 2 hex chars each
125125
}

cryptography/src/bls12381/tle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl From<Digest> for Block {
110110
}
111111

112112
/// Encrypted message.
113-
#[derive(Debug, Clone, PartialEq, Eq)]
113+
#[derive(Hash, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
114114
pub struct Ciphertext<V: Variant> {
115115
/// First group element U = r * Public::one().
116116
pub u: V::Public,

0 commit comments

Comments
 (0)