Trait mitrid_core::crypto::sign::Signable [−][src]
pub trait Signable<P, Sk, Pk, Sig> where
P: Datable,
Sk: Datable + ConstantSize,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
Self: 'static + Sized, { fn sign_cb(
&self,
params: &P,
sk: &Sk,
cb: &Fn(&Self, &P, &Sk) -> Result<Sig>
) -> Result<Sig> { ... } fn verify_signature_cb(
&self,
params: &P,
pk: &Pk,
sig: &Sig,
cb: &Fn(&Self, &P, &Pk, &Sig) -> Result<bool>
) -> Result<bool> { ... } fn check_signature_cb(
&self,
params: &P,
pk: &Pk,
sig: &Sig,
cb: &Fn(&Self, &P, &Pk, &Sig) -> Result<()>
) -> Result<()> { ... } }
Trait implemented by types that can produce and verify cryptographic signatures.
Provided Methods
fn sign_cb(
&self,
params: &P,
sk: &Sk,
cb: &Fn(&Self, &P, &Sk) -> Result<Sig>
) -> Result<Sig>
&self,
params: &P,
sk: &Sk,
cb: &Fn(&Self, &P, &Sk) -> Result<Sig>
) -> Result<Sig>
Signs cryptographically the implementor using Datable
params, a secret key and a callback.
Returns a cryptographic signature.
fn verify_signature_cb(
&self,
params: &P,
pk: &Pk,
sig: &Sig,
cb: &Fn(&Self, &P, &Pk, &Sig) -> Result<bool>
) -> Result<bool>
&self,
params: &P,
pk: &Pk,
sig: &Sig,
cb: &Fn(&Self, &P, &Pk, &Sig) -> Result<bool>
) -> Result<bool>
Verifies a cryptographic signature against the implementor using a public key and a callback.
fn check_signature_cb(
&self,
params: &P,
pk: &Pk,
sig: &Sig,
cb: &Fn(&Self, &P, &Pk, &Sig) -> Result<()>
) -> Result<()>
&self,
params: &P,
pk: &Pk,
sig: &Sig,
cb: &Fn(&Self, &P, &Pk, &Sig) -> Result<()>
) -> Result<()>
Checks a cryptographic signature against the implementor using a public key and a callback.
Implementors
impl<SP, Sk, D, A, P, Pk, Sig> Signable<SP, Sk, Pk, Sig> for Input<D, A, P, Pk, Sig> where
SP: Datable,
Sk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
P: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,impl<SP, D, Sk, Pk, Sig, P> Signable<SP, Sk, Pk, Sig> for Wallet<D, Sk, Pk, Sig, P> where
SP: Datable,
D: Datable + ConstantSize,
Sk: Datable + ConstantSize,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
P: Datable,