[][src]Trait dup_crypto::keys::Signator

pub trait Signator: Debug {
    type Signature: Signature;
    type PublicKey: PublicKey;
    fn public_key(&self) -> Self::PublicKey;
fn sign(&self, message: &[u8]) -> Self::Signature; }

Define the operations that can be performed on a cryptographic signator.

Associated Types

type Signature: Signature

Signature type of associated cryptosystem.

type PublicKey: PublicKey

PublicKey type of associated cryptosystem.

Loading content...

Required methods

fn public_key(&self) -> Self::PublicKey

Get PublicKey

fn sign(&self, message: &[u8]) -> Self::Signature

Sign a message with private key encasuled in signator.

Loading content...

Implementors

impl Signator for SignatorEnum[src]

type PublicKey = PubKey

type Signature = Sig

impl Signator for Signator[src]

type Signature = Signature

type PublicKey = PublicKey

Loading content...