Struct Signature
pub struct Signature<P>where
P: Profile,{ /* private fields */ }Expand description
A 67-segment WOTS signature bound to cryptographic profile P.
Implementations§
§impl<P> Signature<P>where
P: Profile,
impl<P> Signature<P>where
P: Profile,
pub const fn new(segments: [[u8; 32]; 67]) -> Signature<P>
pub const fn new(segments: [[u8; 32]; 67]) -> Signature<P>
Constructs a signature from exactly 67 hash-chain segments.
pub fn from_slice(bytes: &[u8]) -> Result<Signature<P>, LengthError>
pub fn from_slice(bytes: &[u8]) -> Result<Signature<P>, 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 for Signature<P>
impl<P> StructuralPartialEq for Signature<P>where
P: Profile,
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