[][src]Trait tdn_types::group::Peer

pub trait Peer {
    type PublicKey: Serialize + DeserializeOwned;
    type SecretKey: Serialize + DeserializeOwned;
    type Signature: Serialize + DeserializeOwned;
    fn sign(sk: &Self::SecretKey, msg: &Vec<u8>) -> Result<Self::Signature>;
fn verify(
        pk: &Self::PublicKey,
        msg: &Vec<u8>,
        sign: &Self::Signature
    ) -> bool; }

Helper: this is the interface of the Peer in the network.

Associated Types

Loading content...

Required methods

fn sign(sk: &Self::SecretKey, msg: &Vec<u8>) -> Result<Self::Signature>

fn verify(pk: &Self::PublicKey, msg: &Vec<u8>, sign: &Self::Signature) -> bool

Loading content...

Implementors

Loading content...