Trait mitrid_core::crypto::authenticate::Authenticated [−][src]
pub trait Authenticated<P, T> where
P: Datable,
T: Datable + ConstantSize,
Self: Datable, { fn authenticate_cb(
&self,
params: &P,
cb: &Fn(&Self, &P) -> Result<T>
) -> Result<T> { ... } fn verify_tag_cb(
&self,
params: &P,
tag: &T,
cb: &Fn(&Self, &P, &T) -> Result<bool>
) -> Result<bool> { ... } fn check_tag_cb(
&self,
params: &P,
tag: &T,
cb: &Fn(&Self, &P, &T) -> Result<()>
) -> Result<()> { ... } }
Trait used by types that can be cryptographically authenticated.
Provided Methods
fn authenticate_cb(
&self,
params: &P,
cb: &Fn(&Self, &P) -> Result<T>
) -> Result<T>
&self,
params: &P,
cb: &Fn(&Self, &P) -> Result<T>
) -> Result<T>
Authenticates cryptographhically the implementor using Datable
params and a callback.
Returns an authentication tag.
fn verify_tag_cb(
&self,
params: &P,
tag: &T,
cb: &Fn(&Self, &P, &T) -> Result<bool>
) -> Result<bool>
&self,
params: &P,
tag: &T,
cb: &Fn(&Self, &P, &T) -> Result<bool>
) -> Result<bool>
Verifies an authentication tag against the implementor tag.
fn check_tag_cb(
&self,
params: &P,
tag: &T,
cb: &Fn(&Self, &P, &T) -> Result<()>
) -> Result<()>
&self,
params: &P,
tag: &T,
cb: &Fn(&Self, &P, &T) -> Result<()>
) -> Result<()>
Checks an authentication tag against the implementor tag.
Implementors
impl<AP, T, D, A> Authenticated<AP, T> for Coin<D, A> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,impl<AP, T, D, A, P, Pk, Sig> Authenticated<AP, T> for Input<D, A, P, Pk, Sig> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
P: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,impl<AP, T, D, Pk, A, P> Authenticated<AP, T> for Output<D, Pk, A, P> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
Pk: Datable + ConstantSize,
A: Numerical,
P: Datable,impl<AP, T, D, A, IP, Pk, Sig, OP, P> Authenticated<AP, T> for Transaction<D, A, IP, Pk, Sig, OP, P> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
IP: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
OP: Datable,
P: Datable,impl<AP, T, D> Authenticated<AP, T> for BlockNode<D> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,impl<AP, T, D, A, IP, Pk, Sig, OP, TP, P, Pr> Authenticated<AP, T> for Block<D, A, IP, Pk, Sig, OP, TP, P, Pr> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
IP: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
OP: Datable,
TP: Datable,
P: Datable,
Pr: Datable,impl<AP, T, D, P> Authenticated<AP, T> for BlockGraph<D, P> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
P: Datable,impl<AP, T, D, Sk, Pk, Sig, P> Authenticated<AP, T> for Wallet<D, Sk, Pk, Sig, P> where
AP: Datable,
T: Datable + ConstantSize,
D: Datable + ConstantSize,
Sk: Datable + ConstantSize,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
P: Datable,