Struct secp256k1::ecdsa::RecoverableSignature
source · pub struct RecoverableSignature(_);
Expand description
An ECDSA signature with a recovery ID for pubkey recovery.
Implementations§
source§impl RecoverableSignature
impl RecoverableSignature
sourcepub fn from_compact(
data: &[u8],
recid: RecoveryId
) -> Result<RecoverableSignature, Error>
pub fn from_compact(
data: &[u8],
recid: RecoveryId
) -> Result<RecoverableSignature, Error>
Converts a compact-encoded byte slice to a signature. This representation is nonstandard and defined by the libsecp256k1 library.
sourcepub fn as_ptr(&self) -> *const RecoverableSignature
pub fn as_ptr(&self) -> *const RecoverableSignature
Obtains a raw pointer suitable for use with FFI functions.
sourcepub fn as_mut_ptr(&mut self) -> *mut RecoverableSignature
pub fn as_mut_ptr(&mut self) -> *mut RecoverableSignature
Obtains a raw mutable pointer suitable for use with FFI functions.
sourcepub fn serialize_compact(&self) -> (RecoveryId, [u8; 64])
pub fn serialize_compact(&self) -> (RecoveryId, [u8; 64])
Serializes the recoverable signature in compact format.
sourcepub fn to_standard(&self) -> Signature
pub fn to_standard(&self) -> Signature
Converts a recoverable signature to a non-recoverable one (this is needed for verification).
Trait Implementations§
source§impl CPtr for RecoverableSignature
impl CPtr for RecoverableSignature
source§impl Clone for RecoverableSignature
impl Clone for RecoverableSignature
source§fn clone(&self) -> RecoverableSignature
fn clone(&self) -> RecoverableSignature
Returns a copy of the value. Read more
1.0.0 · 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 RecoverableSignature
impl Debug for RecoverableSignature
source§impl From<RecoverableSignature> for RecoverableSignature
impl From<RecoverableSignature> for RecoverableSignature
Creates a new recoverable signature from a FFI one.
source§fn from(sig: RecoverableSignature) -> RecoverableSignature
fn from(sig: RecoverableSignature) -> RecoverableSignature
Converts to this type from the input type.