Trait x3dh_ke::Key[][src]

pub trait Key {
    fn default() -> Self;
fn ex_private_key(&self) -> Option<SecretKey>;
fn ex_public_key(&self) -> PublicKey;
fn strip(&self) -> Self;
fn to_bytes(&self) -> Vec<u8>;
fn from_bytes(data: &[u8]) -> Result<Self, &'static str>
    where
        Self: Sized
; fn diffie_hellman<T: Key>(&self, other: &T) -> SharedSecret { ... }
fn sign(&self, data: &[u8]) -> Signature { ... }
fn verify(&self, message: &[u8], signature: &Signature) -> bool { ... } }

Required methods

Provided methods

Implementors