pub struct EcdsaSigRef(/* private fields */);
Expand description
A reference to an EcdsaSig
.
Implementations§
source§impl EcdsaSigRef
impl EcdsaSigRef
sourcepub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the ECDSA signature into a DER-encoded ECDSASignature structure.
This corresponds to i2d_ECDSA_SIG
.
sourcepub fn verify<T>(
&self,
data: &[u8],
eckey: &EcKeyRef<T>,
) -> Result<bool, ErrorStack>where
T: HasPublic,
pub fn verify<T>(
&self,
data: &[u8],
eckey: &EcKeyRef<T>,
) -> Result<bool, ErrorStack>where
T: HasPublic,
Verifies if the signature is a valid ECDSA signature using the given public key.
This corresponds to ECDSA_do_verify
.
sourcepub fn r(&self) -> &BigNumRef
pub fn r(&self) -> &BigNumRef
Returns internal component: r
of an EcdsaSig
. (See X9.62 or FIPS 186-2)
This corresponds to ECDSA_SIG_get0
.
sourcepub fn s(&self) -> &BigNumRef
pub fn s(&self) -> &BigNumRef
Returns internal components: s
of an EcdsaSig
. (See X9.62 or FIPS 186-2)
This corresponds to ECDSA_SIG_get0
.
Trait Implementations§
source§impl AsRef<EcdsaSigRef> for EcdsaSig
impl AsRef<EcdsaSigRef> for EcdsaSig
source§fn as_ref(&self) -> &EcdsaSigRef
fn as_ref(&self) -> &EcdsaSigRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<EcdsaSigRef> for EcdsaSig
impl Borrow<EcdsaSigRef> for EcdsaSig
source§fn borrow(&self) -> &EcdsaSigRef
fn borrow(&self) -> &EcdsaSigRef
Immutably borrows from an owned value. Read more
source§impl ForeignTypeRef for EcdsaSigRef
impl ForeignTypeRef for EcdsaSigRef
impl Send for EcdsaSigRef
impl Sync for EcdsaSigRef
Auto Trait Implementations§
impl !Freeze for EcdsaSigRef
impl !RefUnwindSafe for EcdsaSigRef
impl Unpin for EcdsaSigRef
impl UnwindSafe for EcdsaSigRef
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