[][src]Trait parsec::PublicId

pub trait PublicId: Clone + Eq + Ord + Hash + Serialize + DeserializeOwned + Debug {
    type Signature: Clone + Eq + Ord + Hash + Serialize + DeserializeOwned + Debug;
    fn verify_signature(&self, signature: &Self::Signature, data: &[u8]) -> bool;
}

The public identity of a node. It provides functionality to allow it to be used as an asymmetric signing public key.

Associated Types

type Signature: Clone + Eq + Ord + Hash + Serialize + DeserializeOwned + Debug

The signature type associated with the chosen asymmetric key scheme.

Loading content...

Required methods

fn verify_signature(&self, signature: &Self::Signature, data: &[u8]) -> bool

Verifies signature against data using this PublicId. Returns true if valid.

Loading content...

Implementors

Loading content...