[−]Struct openssl::ecdsa::EcdsaSig  
A low level interface to ECDSA
OpenSSL documentation at ECDSA_sign
Methods
impl EcdsaSig[src] 
impl EcdsaSigpub fn sign(
    data: &[u8], 
    eckey: &EcKeyRef<Private>
) -> Result<EcdsaSig, ErrorStack>[src] 
pub fn sign(
    data: &[u8], 
    eckey: &EcKeyRef<Private>
) -> Result<EcdsaSig, ErrorStack>Computes a digital signature of the hash value data using the private EC key eckey.
OpenSSL documentation at ECDSA_do_sign
pub fn from_private_components(
    r: BigNum, 
    s: BigNum
) -> Result<EcdsaSig, ErrorStack>[src] 
pub fn from_private_components(
    r: BigNum, 
    s: BigNum
) -> Result<EcdsaSig, ErrorStack>Returns a new EcdsaSig by setting the r and s values associated with a
ECDSA signature.
OpenSSL documentation at ECDSA_SIG_set0
pub fn verify(
    &self, 
    data: &[u8], 
    eckey: &EcKeyRef<Public>
) -> Result<bool, ErrorStack>[src] 
pub fn verify(
    &self, 
    data: &[u8], 
    eckey: &EcKeyRef<Public>
) -> Result<bool, ErrorStack>Verifies if the signature is a valid ECDSA signature using the given public key.
OpenSSL documentation at ECDSA_do_verify
pub fn r(&self) -> &BigNumRef[src] 
pub fn r(&self) -> &BigNumRefReturns internal component: r of a EcdsaSig. (See X9.62 or FIPS 186-2)
OpenSSL documentation at ECDSA_SIG_get0
pub fn s(&self) -> &BigNumRef[src] 
pub fn s(&self) -> &BigNumRefReturns internal components: s of a EcdsaSig. (See X9.62 or FIPS 186-2)
OpenSSL documentation at ECDSA_SIG_get0
pub fn from_der(der: &[u8]) -> Result<EcdsaSig, ErrorStack>[src] 
pub fn from_der(der: &[u8]) -> Result<EcdsaSig, ErrorStack>Decodes a DER-encoded ECDSA signature.
This corresponds to [d2i_ECDSA_SIG]: https://www.openssl.org/docs/man1.1.0/crypto/d2i_ECDSA_SIG.html
Methods from Deref<Target = EcdsaSigRef>
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>[src] 
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]: https://www.openssl.org/docs/man1.1.0/crypto/i2d_ECDSA_SIG.html
Trait Implementations
impl Drop for EcdsaSig
impl Drop for EcdsaSigimpl Sync for EcdsaSig[src] 
impl Sync for EcdsaSigimpl AsRef<EcdsaSigRef> for EcdsaSig
impl AsRef<EcdsaSigRef> for EcdsaSigfn as_ref(&self) -> &EcdsaSigRef
fn as_ref(&self) -> &EcdsaSigRefPerforms the conversion.
impl Send for EcdsaSig[src] 
impl Send for EcdsaSigimpl Deref for EcdsaSig
impl Deref for EcdsaSigtype Target = EcdsaSigRef
The resulting type after dereferencing.
fn deref(&self) -> &EcdsaSigRef
fn deref(&self) -> &EcdsaSigRefDereferences the value.
impl DerefMut for EcdsaSig
impl DerefMut for EcdsaSigfn deref_mut(&mut self) -> &mut EcdsaSigRef
fn deref_mut(&mut self) -> &mut EcdsaSigRefMutably dereferences the value.
impl Borrow<EcdsaSigRef> for EcdsaSig
impl Borrow<EcdsaSigRef> for EcdsaSigfn borrow(&self) -> &EcdsaSigRef
fn borrow(&self) -> &EcdsaSigRefImmutably borrows from an owned value. Read more
impl ForeignType for EcdsaSig
impl ForeignType for EcdsaSigBlanket Implementations
impl<T> From for T[src] 
impl<T> From for Timpl<T, U> Into for T where
    U: From<T>, [src] 
impl<T, U> Into for T where
    U: From<T>, impl<T, U> TryFrom for T where
    T: From<U>, [src] 
impl<T, U> TryFrom for T where
    T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src] 
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
    T: ?Sized, [src] 
impl<T> Borrow for T where
    T: ?Sized, impl<T> BorrowMut for T where
    T: ?Sized, [src] 
impl<T> BorrowMut for T where
    T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src] 
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
    U: TryFrom<T>, [src] 
impl<T, U> TryInto for T where
    U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src] 
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
    T: 'static + ?Sized, [src] 
impl<T> Any for T where
    T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src] 
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API.  (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more