pub struct Signature<P: Profile> { /* private fields */ }Expand description
A 67-segment WOTS signature bound to cryptographic profile P.
Implementations§
Source§impl<P: Profile> Signature<P>
impl<P: Profile> Signature<P>
Sourcepub const fn new(segments: [[u8; 32]; 67]) -> Self
pub const fn new(segments: [[u8; 32]; 67]) -> Self
Constructs a signature from exactly 67 hash-chain segments.
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self, LengthError>
pub fn from_slice(bytes: &[u8]) -> Result<Self, LengthError>
Parses the exact 2,144-byte upstream signature encoding.
§Errors
Returns LengthError unless bytes contains exactly 2,144 bytes.
Trait Implementations§
impl<P: Eq + Profile> Eq for Signature<P>
impl<P: Profile> StructuralPartialEq for Signature<P>
Auto Trait Implementations§
impl<P> Freeze for Signature<P>
impl<P> RefUnwindSafe for Signature<P>
impl<P> Send for Signature<P>
impl<P> Sync for Signature<P>
impl<P> Unpin for Signature<P>
impl<P> UnsafeUnpin for Signature<P>
impl<P> UnwindSafe for Signature<P>
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