pub struct EcdsaSignature { /* private fields */ }Expand description
Raw ECDSA signature pair (r, s).
Both components are positive integers in [1, n) relative to the subgroup
order of the signing curve. The serialized form is a DER SEQUENCE of
two INTEGER values, matching the shape used by DsaSignature.
Implementations§
Source§impl EcdsaSignature
impl EcdsaSignature
pub fn r(&self) -> &BigUint
pub fn s(&self) -> &BigUint
Sourcepub fn to_key_blob(&self) -> Vec<u8> ⓘ
pub fn to_key_blob(&self) -> Vec<u8> ⓘ
Encode the signature as a DER SEQUENCE of (r, s).
Sourcepub fn from_key_blob(blob: &[u8]) -> Option<Self>
pub fn from_key_blob(blob: &[u8]) -> Option<Self>
Decode a crate-defined binary ECDSA signature.
Zero values are rejected immediately. Range checks against the curve order happen during verification because the signature encoding does not carry the curve parameters.
Trait Implementations§
Source§impl Clone for EcdsaSignature
impl Clone for EcdsaSignature
Source§fn clone(&self) -> EcdsaSignature
fn clone(&self) -> EcdsaSignature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EcdsaSignature
impl Debug for EcdsaSignature
Source§impl PartialEq for EcdsaSignature
impl PartialEq for EcdsaSignature
Source§fn eq(&self, other: &EcdsaSignature) -> bool
fn eq(&self, other: &EcdsaSignature) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for EcdsaSignature
impl StructuralPartialEq for EcdsaSignature
Auto Trait Implementations§
impl Freeze for EcdsaSignature
impl RefUnwindSafe for EcdsaSignature
impl Send for EcdsaSignature
impl Sync for EcdsaSignature
impl Unpin for EcdsaSignature
impl UnsafeUnpin for EcdsaSignature
impl UnwindSafe for EcdsaSignature
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