Trait ophelia::Crypto[][src]

pub trait Crypto {
    type PrivateKey: PrivateKey<Signature = Self::Signature> + ToPublicKey<PublicKey = Self::PublicKey>;
    type PublicKey: PublicKey<Signature = Self::Signature>;
    type Signature: Signature + SignatureVerify<PublicKey = Self::PublicKey>;
    fn pub_key(priv_key: &[u8]) -> Result<Self::PublicKey, Error> { ... }
fn sign_message(
        msg: &[u8],
        priv_key: &[u8]
    ) -> Result<Self::Signature, Error> { ... }
fn verify_signature(
        msg: &[u8],
        sig: &[u8],
        pub_key: &[u8]
    ) -> Result<(), Error> { ... } }

Associated Types

Provided methods

Implementors