pub struct Signature { /* private fields */ }
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn to_der_hex(&self) -> String
pub fn to_der_hex(&self) -> String
DER representation of signature, does not contain any recovery information, so cannot be used for BSM
Sourcepub fn to_der_bytes(&self) -> Vec<u8> ⓘ
pub fn to_der_bytes(&self) -> Vec<u8> ⓘ
DER representation of signature, does not contain any recovery information, so cannot be used for BSM
Sourcepub fn to_compact_bytes(&self, recovery_info: Option<RecoveryInfo>) -> Vec<u8> ⓘ
pub fn to_compact_bytes(&self, recovery_info: Option<RecoveryInfo>) -> Vec<u8> ⓘ
NOTE: Provide recovery info if the current signature object doesnt contain it.
Sourcepub fn to_compact_hex(&self, recovery_info: Option<RecoveryInfo>) -> String
pub fn to_compact_hex(&self, recovery_info: Option<RecoveryInfo>) -> String
NOTE: Provide recovery info if the current signature object doesnt contain it.
pub fn verify_message(&self, message: &[u8], pub_key: &PublicKey) -> bool
Source§impl Signature
Native Exported Methods
impl Signature
Native Exported Methods
pub fn from_der(bytes: &[u8]) -> Result<Signature, BSVErrors>
pub fn from_hex_der(hex: &str) -> Result<Signature, BSVErrors>
pub fn from_compact_bytes(compact_bytes: &[u8]) -> Result<Signature, BSVErrors>
pub fn recover_public_key( &self, message: &[u8], hash_algo: SigningHash, ) -> Result<PublicKey, BSVErrors>
Trait Implementations§
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more