[][src]Trait mundane::public::PublicKey

pub trait PublicKey: Sealed + Sized {
    type Private: PrivateKey<Public = Self>;
#[must_use]
    fn is_valid<S: Signature<PrivateKey = Self::Private>>(
        &self,
        message: &[u8],
        signature: &S
    ) -> bool { ... } }

The public component of a public/private key pair.

Associated Types

type Private: PrivateKey<Public = Self>

The type of the private component.

Loading content...

Provided methods

#[must_use] fn is_valid<S: Signature<PrivateKey = Self::Private>>(
    &self,
    message: &[u8],
    signature: &S
) -> bool

Verifies a message with this public key.

is_valid verifies that a message was signed by the private key corresponding to this public key. It is equivalent to signature.is_valid(self, message).

Loading content...

Implementors

impl PublicKey for Ed25519PubKey[src]

impl<B: RsaKeyBits> PublicKey for RsaPubKey<B>[src]

impl<C: PCurve> PublicKey for EcPubKey<C>[src]

type Private = EcPrivKey<C>

Loading content...