pub struct Signature(/* private fields */);Expand description
An ECDSA signature (r, s).
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn from_bytes(bytes: &[u8; 64]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8; 64]) -> Result<Self, Error>
Parse the fixed-size encoding r || s, big-endian. Fails if either
component is zero or not less than n.
Sourcepub fn from_scalars(r: &[u8; 32], s: &[u8; 32]) -> Result<Self, Error>
pub fn from_scalars(r: &[u8; 32], s: &[u8; 32]) -> Result<Self, Error>
Build a signature from its components, big-endian. Fails if
either is zero or not less than n.
Sourcepub fn as_driver(&self) -> &P256Signature
pub fn as_driver(&self) -> &P256Signature
The driver representation.
Trait Implementations§
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnsafeUnpin for Signature
impl UnwindSafe for Signature
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