Skip to main content

VerifyingKey

Type Alias VerifyingKey 

Source
pub type VerifyingKey<D> = GenericVerifyingKey<D, BoxedUint, BoxedMontyParams>;
Available on crate feature alloc only.
Expand description

Boxed PKCS#1 v1.5 verifying key alias.

Aliased Type§

pub struct VerifyingKey<D> { /* private fields */ }

Trait Implementations§

Source§

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

Available on crate feature encoding only.
Source§

const ALGORITHM_IDENTIFIER: AlgorithmIdentifierRef<'static> = pkcs1::ALGORITHM_ID

AlgorithmIdentifier for this structure.
Source§

type Params = AnyRef<'static>

Algorithm parameters.
Source§

impl<'de, D> Deserialize<'de> for VerifyingKey<D>
where D: Digest + AssociatedOid,

Available on crate feature serde only.
Source§

fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>
where De: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

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

Available on crate feature encoding only.
Source§

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

Serialize a Document containing a SPKI-encoded public key. Read more
Source§

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

Available on crate feature pem only.
Serialize this public key as PEM-encoded SPKI with the given LineEnding. Read more
Source§

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

Available on crate feature std only.
Write ASN.1 DER-encoded public key to the given path. Read more
Source§

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

Available on crate features pem and std only.
Write ASN.1 PEM-encoded public key to the given path. Read more
Source§

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

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<D> SignatureAlgorithmIdentifier for VerifyingKey<D>

Available on crate feature encoding only.
Source§

const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifierRef<'static>

AlgorithmIdentifier for the corresponding signature system.
Source§

type Params = AnyRef<'static>

Algorithm parameters.
Source§

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

Available on crate feature encoding only.
Source§

type Error = Error

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

fn try_from(spki: SubjectPublicKeyInfoRef<'_>) -> Result<Self>

Performs the conversion.