Skip to content

Commit

Permalink
Derive Eq, Hash and PartialEq for DigestBytes
Browse files Browse the repository at this point in the history
With the above traits a certificate and its DigestBytes can be stored in a
HashMap.
  • Loading branch information
darkseid-is committed Sep 5, 2024
1 parent a94ccf2 commit 5394701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openssl/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ impl Drop for Hasher {
///
/// This type derefs to a byte slice - it exists to avoid allocating memory to
/// store the digest data.
#[derive(Copy)]
#[derive(Copy, Eq, Hash, PartialEq)]
pub struct DigestBytes {
pub(crate) buf: [u8; ffi::EVP_MAX_MD_SIZE as usize],
pub(crate) len: usize,
Expand Down

0 comments on commit 5394701

Please sign in to comment.