pub struct MessageDigest(/* private fields */);Expand description
An already-hashed 32-byte message consumed by the WOTS construction.
HashSigsRS does not hash an arbitrary-length application message before
signing. The caller is responsible for a domain-separated, collision-
resistant application prehash.
Implementations§
Source§impl MessageDigest
impl MessageDigest
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self, LengthError>
pub fn from_slice(bytes: &[u8]) -> Result<Self, LengthError>
Parses a message digest, rejecting every non-32-byte input.
§Errors
Returns LengthError unless bytes contains exactly 32 bytes.
Sourcepub const fn into_bytes(self) -> [u8; 32]
pub const fn into_bytes(self) -> [u8; 32]
Returns the digest bytes.
Trait Implementations§
Source§impl Clone for MessageDigest
impl Clone for MessageDigest
Source§fn clone(&self) -> MessageDigest
fn clone(&self) -> MessageDigest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageDigest
impl Debug for MessageDigest
Source§impl Hash for MessageDigest
impl Hash for MessageDigest
Source§impl PartialEq for MessageDigest
impl PartialEq for MessageDigest
impl Copy for MessageDigest
impl Eq for MessageDigest
impl StructuralPartialEq for MessageDigest
Auto Trait Implementations§
impl Freeze for MessageDigest
impl RefUnwindSafe for MessageDigest
impl Send for MessageDigest
impl Sync for MessageDigest
impl Unpin for MessageDigest
impl UnsafeUnpin for MessageDigest
impl UnwindSafe for MessageDigest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more