Struct ckb_crypto::secp::Signature
source · pub struct Signature(_);
Expand description
RecoverableSignature compact serialize
Implementations§
source§impl Signature
impl Signature
sourcepub fn from_compact(rec_id: RecoveryId, ret: [u8; 64]) -> Self
pub fn from_compact(rec_id: RecoveryId, ret: [u8; 64]) -> Self
Construct a new Signature from compact serialize slice and rec_id
sourcepub fn from_slice(data: &[u8]) -> Result<Self, Error>
pub fn from_slice(data: &[u8]) -> Result<Self, Error>
Construct a new Signature from slice.
sourcepub fn to_recoverable(&self) -> Result<RecoverableSignature, Error>
pub fn to_recoverable(&self) -> Result<RecoverableSignature, Error>
Converts compact signature to a recoverable signature
sourcepub fn recover(&self, message: &Message) -> Result<Pubkey, Error>
pub fn recover(&self, message: &Message) -> Result<Pubkey, Error>
Determines the public key for signature
sourcepub fn serialize_der(&self) -> Vec<u8>
pub fn serialize_der(&self) -> Vec<u8>
Serializes the signature in DER format