[−][src]Struct ckb_crypto::secp::Signature
RecoverableSignature compact serialize
Implementations
impl Signature
[src]
pub fn r(&self) -> &[u8]
[src]
Get a slice into the 'r' portion of the data.
pub fn s(&self) -> &[u8]
[src]
Get a slice into the 's' portion of the data.
pub fn v(&self) -> u8
[src]
Get the recovery id.
pub fn from_compact(rec_id: RecoveryId, ret: [u8; 64]) -> Self
[src]
Construct a new Signature from compact serialize slice and rec_id
pub fn from_rsv(r: &H256, s: &H256, v: u8) -> Self
[src]
Construct a new Signature from rsv.
pub fn from_slice(data: &[u8]) -> Result<Self, Error>
[src]
Construct a new Signature from slice.
pub fn is_valid(&self) -> bool
[src]
Check if each component of the signature is in range.
pub fn to_recoverable(&self) -> Result<RecoverableSignature, Error>
[src]
Converts compact signature to a recoverable signature
pub fn recover(&self, message: &Message) -> Result<Pubkey, Error>
[src]
Determines the public key for signature
pub fn serialize(&self) -> Vec<u8>
[src]
Serializes the signature to vec
pub fn serialize_der(&self) -> Vec<u8>
[src]
Serializes the signature in DER format
Trait Implementations
impl Clone for Signature
[src]
impl Debug for Signature
[src]
impl From<H520> for Signature
[src]
impl From<Signature> for H520
[src]
impl From<Vec<u8, Global>> for Signature
[src]
impl FromStr for Signature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Signature
[src]
impl Send for Signature
[src]
impl Sync for Signature
[src]
impl Unpin for Signature
[src]
impl UnwindSafe for Signature
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,