Crypto

Trait Crypto 

Source
pub trait Crypto {
    // Required methods
    fn pub_key(&self) -> &[u8; 32];
    fn sign(&self, nonce: &[u8]) -> Result<[u8; 64]>;
}
Expand description

Crypto to use. Note, the pair should be fresh for each new connection.

Required Methods§

Source

fn pub_key(&self) -> &[u8; 32]

The pubkey.

Source

fn sign(&self, nonce: &[u8]) -> Result<[u8; 64]>

Sign the nonce.

Implementors§