Trait mitrid_core::crypto::hash::Hashable [−][src]
pub trait Hashable<P, D> where
P: Datable,
D: Datable + ConstantSize,
Self: Datable, { fn digest_cb(
&self,
params: &P,
cb: &Fn(&Self, &P) -> Result<D>
) -> Result<D> { ... } fn verify_digest_cb(
&self,
params: &P,
digest: &D,
cb: &Fn(&Self, &P, &D) -> Result<bool>
) -> Result<bool> { ... } fn check_digest_cb(
&self,
params: &P,
digest: &D,
cb: &Fn(&Self, &P, &D) -> Result<()>
) -> Result<()> { ... } }
Trait implemented by types that can be cryptographically hashed.
Provided Methods
fn digest_cb(&self, params: &P, cb: &Fn(&Self, &P) -> Result<D>) -> Result<D>
Hashes cryptographically the implementor using Datable
params and a callback.
Returns a cryptographic digest.
fn verify_digest_cb(
&self,
params: &P,
digest: &D,
cb: &Fn(&Self, &P, &D) -> Result<bool>
) -> Result<bool>
&self,
params: &P,
digest: &D,
cb: &Fn(&Self, &P, &D) -> Result<bool>
) -> Result<bool>
Verifies the cryptographic digest against the implementor digest.
fn check_digest_cb(
&self,
params: &P,
digest: &D,
cb: &Fn(&Self, &P, &D) -> Result<()>
) -> Result<()>
&self,
params: &P,
digest: &D,
cb: &Fn(&Self, &P, &D) -> Result<()>
) -> Result<()>
Verifies the cryptographic digest against the implementor digest.
Implementors
impl<P, D, A> Hashable<P, D> for Coin<D, A> where
P: Datable,
D: Datable + ConstantSize,
A: Numerical,impl<HP, D, A, P, Pk, Sig> Hashable<HP, D> for Input<D, A, P, Pk, Sig> where
HP: Datable,
D: Datable + ConstantSize,
A: Numerical,
P: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,impl<HP, D, Pk, A, P> Hashable<HP, D> for Output<D, Pk, A, P> where
HP: Datable,
D: Datable + ConstantSize,
Pk: Datable + ConstantSize,
A: Numerical,
P: Datable,impl<HP, D, A, IP, Pk, Sig, OP, P> Hashable<HP, D> for Transaction<D, A, IP, Pk, Sig, OP, P> where
HP: Datable,
D: Datable + ConstantSize,
A: Numerical,
IP: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
OP: Datable,
P: Datable,impl<P, D> Hashable<P, D> for BlockNode<D> where
P: Datable,
D: Datable + ConstantSize,impl<HP, D, A, IP, Pk, Sig, OP, TP, P, Pr> Hashable<HP, D> for Block<D, A, IP, Pk, Sig, OP, TP, P, Pr> where
HP: Datable,
D: Datable + ConstantSize,
A: Numerical,
IP: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
OP: Datable,
TP: Datable,
P: Datable,
Pr: Datable,impl<HP, D, P> Hashable<HP, D> for BlockGraph<D, P> where
HP: Datable,
D: Datable + ConstantSize,
P: Datable,impl<HP, D, Sk, Pk, Sig, P> Hashable<HP, D> for Wallet<D, Sk, Pk, Sig, P> where
HP: Datable,
D: Datable + ConstantSize,
Sk: Datable + ConstantSize,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
P: Datable,