[−][src]Trait cylinder::Context
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]
&self,
private_key: &PrivateKey
) -> Result<PublicKey, ContextError>
Computes the public key that corresponds to the given private key
Implementors
impl Context for HashContext
[src]
pub fn algorithm_name(&self) -> &str
[src]
pub fn new_signer(&self, _key: PrivateKey) -> Box<dyn Signer>
[src]
pub fn new_verifier(&self) -> Box<dyn Verifier>
[src]
pub fn new_random_private_key(&self) -> PrivateKey
[src]
pub fn get_public_key(
&self,
_private_key: &PrivateKey
) -> Result<PublicKey, ContextError>
[src]
&self,
_private_key: &PrivateKey
) -> Result<PublicKey, ContextError>
impl Context for Secp256k1Context
[src]
pub fn algorithm_name(&self) -> &str
[src]
pub fn new_signer(&self, key: PrivateKey) -> Box<dyn Signer>
[src]
pub fn new_verifier(&self) -> Box<dyn Verifier>
[src]
pub fn new_random_private_key(&self) -> PrivateKey
[src]
pub fn get_public_key(
&self,
private_key: &PrivateKey
) -> Result<PublicKey, ContextError>
[src]
&self,
private_key: &PrivateKey
) -> Result<PublicKey, ContextError>