Struct shuttle_core::Signature
[−]
[src]
pub struct Signature { /* fields omitted */ }A signature.
Methods
impl Signature[src]
fn sign(secret: &SecretKey, data: &[u8]) -> Signature[src]
Sign data using the secret key.
fn from_slice(sb: &[u8]) -> Result<Signature>[src]
Return a Signature from bytes.
fn len(&self) -> usize[src]
Length in bytes of the signature.
fn to_vec(&self) -> Vec<u8>[src]
Convert to Vec<u8>.
fn buf(&self) -> &[u8][src]
Inner buffer as slice.
fn verify(&self, public: &PublicKey, data: &[u8]) -> bool[src]
Verify the signature againt the data and the public key.
Return true if the signature is valid, false otherwise.
Trait Implementations
impl Debug for Signature[src]
impl Clone for Signature[src]
fn clone(&self) -> Signature[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for Signature[src]
fn eq(&self, __arg_0: &Signature) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Signature) -> bool[src]
This method tests for !=.