Trait CommitVerify

Source
pub trait CommitVerify<Msg, Protocol: CommitmentProtocol>
where Self: Eq + Sized,
{ // Required method fn commit(msg: &Msg) -> Self; // Provided method fn verify(&self, msg: &Msg) -> Result<(), VerifyError> { ... } }
Expand description

Trait for commit-verify scheme.

Required Methods§

Source

fn commit(msg: &Msg) -> Self

Creates a commitment to a byte representation of a given message

Provided Methods§

Source

fn verify(&self, msg: &Msg) -> Result<(), VerifyError>

Verifies commitment against the message; default implementation just repeats the commitment to the message and check it against the self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§