Type Alias mas_jose::jwa::Rs384VerifyingKey

source ·
pub type Rs384VerifyingKey = VerifyingKey<Sha384>;

Aliased Type§

struct Rs384VerifyingKey { /* private fields */ }

Implementations

source§

impl<D> VerifyingKey<D>
where D: Digest + AssociatedOid,

source

pub fn new(key: RsaPublicKey) -> VerifyingKey<D>

Create a new verifying key with a prefix for the digest D.

source

pub fn new_with_prefix(key: RsaPublicKey) -> VerifyingKey<D>

👎Deprecated since 0.9.0: use VerifyingKey::new instead

Create a new verifying key with a prefix for the digest D.

source§

impl<D> VerifyingKey<D>
where D: Digest,

source

pub fn new_unprefixed(key: RsaPublicKey) -> VerifyingKey<D>

Create a new verifying key from an RSA public key with an empty prefix.

§Note: unprefixed signatures are uncommon

In most cases you’ll want to use VerifyingKey::new instead.

Trait Implementations

source§

impl<D> AsRef<RsaPublicKey> for VerifyingKey<D>
where D: Digest,

source§

fn as_ref(&self) -> &RsaPublicKey

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<D> AssociatedAlgorithmIdentifier for VerifyingKey<D>
where D: Digest,

§

type Params = AnyRef<'static>

Algorithm parameters.
source§

const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<AnyRef<'static>> = pkcs1::ALGORITHM_ID

AlgorithmIdentifier for this structure.
source§

impl<D> Clone for VerifyingKey<D>
where D: Digest,

source§

fn clone(&self) -> VerifyingKey<D>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<D> Debug for VerifyingKey<D>
where D: Debug + Digest,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<D> DigestVerifier<D, Signature> for VerifyingKey<D>
where D: Digest,

source§

fn verify_digest(&self, digest: D, signature: &Signature) -> Result<(), Error>

Verify the signature against the given Digest output.
source§

impl<D> EncodePublicKey for VerifyingKey<D>
where D: Digest,

source§

fn to_public_key_der(&self) -> Result<Document, Error>

Serialize a Document containing a SPKI-encoded public key.
source§

fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>

Serialize this public key as PEM-encoded SPKI with the given LineEnding.
source§

fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>

Write ASN.1 DER-encoded public key to the given path
source§

fn write_public_key_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding, ) -> Result<(), Error>

Write ASN.1 DER-encoded public key to the given path
source§

impl<D> From<RsaPublicKey> for VerifyingKey<D>
where D: Digest,

source§

fn from(key: RsaPublicKey) -> VerifyingKey<D>

Converts to this type from the input type.
source§

impl<D> PrehashVerifier<Signature> for VerifyingKey<D>
where D: Digest,

source§

fn verify_prehash( &self, prehash: &[u8], signature: &Signature, ) -> Result<(), Error>

Use Self to verify that the provided signature for a given message prehash is authentic. Read more
source§

impl<D> SignatureAlgorithmIdentifier for VerifyingKey<D>

§

type Params = AnyRef<'static>

Algorithm parameters.
source§

const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<AnyRef<'static>> = _

AlgorithmIdentifier for the corresponding singature system.
source§

impl<D> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<D>
where D: Digest + AssociatedOid,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( spki: SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>, ) -> Result<VerifyingKey<D>, Error>

Performs the conversion.
source§

impl<D> Verifier<Signature> for VerifyingKey<D>
where D: Digest,

source§

fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error>

Use Self to verify that the provided signature for a given message bytestring is authentic. Read more