[][src]Trait cylinder::Context

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

A context for creating signers and verifiers

Required methods

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

Creates a new signer with the given private key

fn new_verifier(&self) -> Box<dyn Verifier>

Creates a new signature verifier

fn new_random_private_key(&self) -> PrivateKey

Generates a new random private key

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

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...