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

pub trait CommitVerify<MSG> where
    Self: Eq + Sized
{ pub fn commit(msg: &MSG) -> Self; pub 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

pub fn commit(msg: &MSG) -> Self[src]

Creates a commitment to a byte representation of a given message

Loading content...

Provided methods

pub fn verify(&self, msg: &MSG) -> bool[src]

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

Loading content...

Implementations on Foreign Types

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

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

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

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

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

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

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

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

Loading content...

Implementors

impl CommitVerify<OutpointReveal> for OutpointHash[src]

impl CommitVerify<Revealed> for Confidential[src]

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

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

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

Loading content...