Struct secp256k1::RecoverableSignature
source · [−]pub struct RecoverableSignature(_);
Expand description
An ECDSA signature with a recovery ID for pubkey recovery
Implementations
sourceimpl RecoverableSignature
impl RecoverableSignature
sourcepub fn from_compact(
secp: &Secp256k1,
data: &[u8],
recid: RecoveryId
) -> Result<RecoverableSignature, Error>
pub fn from_compact(
secp: &Secp256k1,
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 serialize_compact(&self, secp: &Secp256k1) -> (RecoveryId, [u8; 64])
pub fn serialize_compact(&self, secp: &Secp256k1) -> (RecoveryId, [u8; 64])
Serializes the recoverable signature in compact format
sourcepub fn to_standard(&self, secp: &Secp256k1) -> Signature
pub fn to_standard(&self, secp: &Secp256k1) -> Signature
Converts a recoverable signature to a non-recoverable one (this is needed for verification
Trait Implementations
sourceimpl Clone for RecoverableSignature
impl Clone for RecoverableSignature
sourcefn clone(&self) -> RecoverableSignature
fn clone(&self) -> RecoverableSignature
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RecoverableSignature
impl Debug for RecoverableSignature
sourceimpl From<RecoverableSignature> for RecoverableSignature
impl From<RecoverableSignature> for RecoverableSignature
Creates a new recoverable signature from a FFI one
sourcefn from(sig: RecoverableSignature) -> RecoverableSignature
fn from(sig: RecoverableSignature) -> RecoverableSignature
Performs the conversion.
sourceimpl PartialEq<RecoverableSignature> for RecoverableSignature
impl PartialEq<RecoverableSignature> for RecoverableSignature
sourcefn eq(&self, other: &RecoverableSignature) -> bool
fn eq(&self, other: &RecoverableSignature) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RecoverableSignature) -> bool
fn ne(&self, other: &RecoverableSignature) -> bool
This method tests for !=
.
impl Copy for RecoverableSignature
impl Eq for RecoverableSignature
impl StructuralEq for RecoverableSignature
impl StructuralPartialEq for RecoverableSignature
Auto Trait Implementations
impl RefUnwindSafe for RecoverableSignature
impl Send for RecoverableSignature
impl Sync for RecoverableSignature
impl Unpin for RecoverableSignature
impl UnwindSafe for RecoverableSignature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more