Struct openssl::ecdsa::EcdsaSig [−]
pub struct EcdsaSig(_);
A low level interface to ECDSA
OpenSSL documentation at ECDSA_sign
Methods
impl EcdsaSig
[src]
impl EcdsaSig
pub 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) -> &BigNumRef
Returns 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) -> &BigNumRef
Returns internal components: s
of a EcdsaSig
. (See X9.62 or FIPS 186-2)
OpenSSL documentation at ECDSA_SIG_get0
Trait Implementations
impl ForeignType for EcdsaSig
impl ForeignType for EcdsaSig
type CType = ECDSA_SIG
The raw C type.
type Ref = EcdsaSigRef
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut ECDSA_SIG) -> EcdsaSig
unsafe fn from_ptr(ptr: *mut ECDSA_SIG) -> EcdsaSig
Constructs an instance of this type from its raw type.
fn as_ptr(&self) -> *mut ECDSA_SIG
fn as_ptr(&self) -> *mut ECDSA_SIG
Returns a raw pointer to the wrapped value.
impl Drop for EcdsaSig
impl Drop for EcdsaSig
impl Deref for EcdsaSig
impl Deref for EcdsaSig
type Target = EcdsaSigRef
The resulting type after dereferencing.
fn deref(&self) -> &EcdsaSigRef
fn deref(&self) -> &EcdsaSigRef
Dereferences the value.
impl DerefMut for EcdsaSig
impl DerefMut for EcdsaSig
fn deref_mut(&mut self) -> &mut EcdsaSigRef
fn deref_mut(&mut self) -> &mut EcdsaSigRef
Mutably dereferences the value.
impl Borrow<EcdsaSigRef> for EcdsaSig
impl Borrow<EcdsaSigRef> for EcdsaSig
fn borrow(&self) -> &EcdsaSigRef
fn borrow(&self) -> &EcdsaSigRef
Immutably borrows from an owned value. Read more
impl AsRef<EcdsaSigRef> for EcdsaSig
impl AsRef<EcdsaSigRef> for EcdsaSig
fn as_ref(&self) -> &EcdsaSigRef
fn as_ref(&self) -> &EcdsaSigRef
Performs the conversion.
impl Send for EcdsaSig
[src]
impl Send for EcdsaSig
impl Sync for EcdsaSig
[src]
impl Sync for EcdsaSig