Struct boring_imp::ecdsa::EcdsaSigRef
source · pub struct EcdsaSigRef(/* private fields */);Expand description
A borrowed reference to a 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.
OpenSSL documentation at 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)
OpenSSL documentation at 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)
OpenSSL documentation at ECDSA_SIG_get0
Trait Implementations§
source§impl AsMut<EcdsaSigRef> for EcdsaSig
impl AsMut<EcdsaSigRef> for EcdsaSig
source§fn as_mut(&mut self) -> &mut EcdsaSigRef
fn as_mut(&mut self) -> &mut EcdsaSigRef
Converts this type into a mutable reference of the (usually inferred) input type.
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 BorrowMut<EcdsaSigRef> for EcdsaSig
impl BorrowMut<EcdsaSigRef> for EcdsaSig
source§fn borrow_mut(&mut self) -> &mut EcdsaSigRef
fn borrow_mut(&mut self) -> &mut EcdsaSigRef
Mutably borrows from an owned value. Read more
source§impl ForeignTypeRef for EcdsaSigRef
impl ForeignTypeRef for EcdsaSigRef
§type CType = ecdsa_sig_st
type CType = ecdsa_sig_st
The raw C type.
source§unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
Constructs a shared instance of this type from its raw type. Read more
source§unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
Constructs a mutable reference of this type from its raw type. Read more
impl Send for EcdsaSigRef
impl Sync for EcdsaSigRef
Auto Trait Implementations§
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