Trait cypher::EcSign

source ·
pub trait EcSign: EcSk {
    type Sig: EcSig<Pk = Self::Pk>;

    // Required method
    fn sign(&self, msg: impl AsRef<[u8]>) -> Self::Sig;

    // Provided method
    fn cert(&self) -> Result<Cert<Self::Sig>, EcSkInvalid> { ... }
}
Expand description

Signature scheme trait

Required Associated Types§

source

type Sig: EcSig<Pk = Self::Pk>

Required Methods§

source

fn sign(&self, msg: impl AsRef<[u8]>) -> Self::Sig

Provided Methods§

source

fn cert(&self) -> Result<Cert<Self::Sig>, EcSkInvalid>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl EcSign for SecretKey

Available on crate feature ed25519 only.
§

type Sig = Signature

source§

fn sign(&self, msg: impl AsRef<[u8]>) -> Signature

Implementors§

source§

impl EcSign for PrivateKey

Available on crate feature ed25519 only.