[][src]Trait cylinder::Context

pub trait Context: Send {
    pub fn algorithm_name(&self) -> &str;
pub fn new_signer(&self, key: PrivateKey) -> Box<dyn Signer>;
pub fn new_verifier(&self) -> Box<dyn Verifier>;
pub fn new_random_private_key(&self) -> PrivateKey;
pub fn get_public_key(
        &self,
        private_key: &PrivateKey
    ) -> Result<PublicKey, ContextError>; }

A context for creating signers and verifiers

Required methods

pub fn algorithm_name(&self) -> &str[src]

Return the algorithm name provided by this context.

pub fn new_signer(&self, key: PrivateKey) -> Box<dyn Signer>[src]

Creates a new signer with the given private key

pub fn new_verifier(&self) -> Box<dyn Verifier>[src]

Creates a new signature verifier

pub fn new_random_private_key(&self) -> PrivateKey[src]

Generates a new random private key

pub fn get_public_key(
    &self,
    private_key: &PrivateKey
) -> Result<PublicKey, ContextError>
[src]

Computes the public key that corresponds to the given private key

Loading content...

Implementors

impl Context for HashContext[src]

impl Context for Secp256k1Context[src]

Loading content...