Trait 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>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl EcSign for SecretKey

Available on crate feature ed25519 only.
Source§

type Sig = Signature

Source§

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

Implementors§

Source§

impl EcSign for PrivateKey

Available on crate feature ed25519 only.