[][src]Trait lnpbp::commit_verify::CommitVerify

pub trait CommitVerify<MSG> where
    Self: Eq + Sized
{ fn commit(msg: &MSG) -> Self; fn verify(&self, msg: &MSG) -> bool { ... } }

Trait for commit-verify scheme. A message for the commitment may be any structure that can be represented as a byte array (i.e. implements AsRef<[u8]>).

Required methods

fn commit(msg: &MSG) -> Self

Creates a commitment to a byte representation of a given message

Loading content...

Provided methods

fn verify(&self, msg: &MSG) -> bool

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

Loading content...

Implementors

impl CommitVerify<OutpointReveal> for OutpointHash[src]

impl<HT, MSG> CommitVerify<MSG> for HT where
    HT: Hash,
    MSG: AsRef<[u8]>, 
[src]

Loading content...