CoreSign

Trait CoreSign 

Source
pub trait CoreSign {
    // Required methods
    fn sign(&self, payload: &[u8]) -> Result<Vec<u8>, Error>;
    fn verify(&self, payload: &[u8], signature: &[u8]) -> Result<(), Error>;
}
Expand description

A trait for types that support creating and verifying digital signatures.

Required Methods§

Source

fn sign(&self, payload: &[u8]) -> Result<Vec<u8>, Error>

Performs a sign operation.

Returns a Result containing the signature, or an Error if the operation fails.

Source

fn verify(&self, payload: &[u8], signature: &[u8]) -> Result<(), Error>

Performs a verify operation.

Returns a Result containing (), or an Error if the operation fails.

Implementors§