[][src]Trait mundane::public::PrivateKey

pub trait PrivateKey: Sealed + Sized {
    type Public: PublicKey<Private = Self>;
    fn public(&self) -> Self::Public;

    fn sign<S: Signature<PrivateKey = Self>>(
        message: &[u8]
    ) -> Result<S, Error> { ... } }

The private component of a public/private key pair.

Associated Types

type Public: PublicKey<Private = Self>

The type of the public component.

Loading content...

Required methods

#[must_use] fn public(&self) -> Self::Public

Gets the public key corresponding to this private key.

Loading content...

Provided methods

#[must_use] fn sign<S: Signature<PrivateKey = Self>>(
    message: &[u8]
) -> Result<S, Error>

Signs a message with this private key.

sign signs a message with this key using the signature scheme S. It is equivalent to S::sign(self, message).

Loading content...


impl PrivateKey for Ed25519PrivKey[src]

impl<B: RsaKeyBits> PrivateKey for RsaPrivKey<B>[src]

type Public = RsaPubKey<B>

impl<C: PCurve> PrivateKey for EcPrivKey<C>[src]

type Public = EcPubKey<C>

Loading content...