Struct rsa::pkcs1v15::VerifyingKey
source · pub struct VerifyingKey<D>where
D: Digest,{ /* private fields */ }
Expand description
Verifying key for PKCS#1 v1.5 signatures as described in RFC8017 § 8.2.
Implementations
sourceimpl<D> VerifyingKey<D>where
D: Digest,
impl<D> VerifyingKey<D>where
D: Digest,
sourcepub fn new(key: RsaPublicKey) -> Self
pub fn new(key: RsaPublicKey) -> Self
Create a new verifying key from an RSA public key.
sourceimpl<D> VerifyingKey<D>where
D: Digest + AssociatedOid,
impl<D> VerifyingKey<D>where
D: Digest + AssociatedOid,
sourcepub fn new_with_prefix(key: RsaPublicKey) -> Self
pub fn new_with_prefix(key: RsaPublicKey) -> Self
Create a new verifying key with a prefix for the digest D
.
Trait Implementations
sourceimpl<D> AsRef<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
impl<D> AsRef<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
sourcefn as_ref(&self) -> &RsaPublicKey
fn as_ref(&self) -> &RsaPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl<D: Clone> Clone for VerifyingKey<D>where
D: Digest,
impl<D: Clone> Clone for VerifyingKey<D>where
D: Digest,
sourcefn clone(&self) -> VerifyingKey<D>
fn clone(&self) -> VerifyingKey<D>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<D: Debug> Debug for VerifyingKey<D>where
D: Digest,
impl<D: Debug> Debug for VerifyingKey<D>where
D: Digest,
sourceimpl<D> DigestVerifier<D, Signature> for VerifyingKey<D>where
D: Digest,
impl<D> DigestVerifier<D, Signature> for VerifyingKey<D>where
D: Digest,
sourceimpl<D> EncodePublicKey for VerifyingKey<D>where
D: Digest,
impl<D> EncodePublicKey for VerifyingKey<D>where
D: Digest,
sourcefn to_public_key_der(&self) -> Result<Document>
fn to_public_key_der(&self) -> Result<Document>
Serialize a [
Document
] containing a SPKI-encoded public key.fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
Serialize this public key as PEM-encoded SPKI with the given [
LineEnding
].fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
Write ASN.1 DER-encoded public key to the given path
fn write_public_key_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<(), Error>
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
sourceimpl<D> From<&SigningKey<D>> for VerifyingKey<D>where
D: Digest,
impl<D> From<&SigningKey<D>> for VerifyingKey<D>where
D: Digest,
sourcefn from(key: &SigningKey<D>) -> Self
fn from(key: &SigningKey<D>) -> Self
Converts to this type from the input type.
sourceimpl<D> From<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
impl<D> From<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
sourcefn from(key: RsaPublicKey) -> Self
fn from(key: RsaPublicKey) -> Self
Converts to this type from the input type.
sourceimpl<D> From<SigningKey<D>> for VerifyingKey<D>where
D: Digest,
impl<D> From<SigningKey<D>> for VerifyingKey<D>where
D: Digest,
sourcefn from(key: SigningKey<D>) -> Self
fn from(key: SigningKey<D>) -> Self
Converts to this type from the input type.
sourceimpl<D> From<VerifyingKey<D>> for RsaPublicKeywhere
D: Digest,
impl<D> From<VerifyingKey<D>> for RsaPublicKeywhere
D: Digest,
sourcefn from(key: VerifyingKey<D>) -> Self
fn from(key: VerifyingKey<D>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<D> RefUnwindSafe for VerifyingKey<D>where
D: RefUnwindSafe,
impl<D> Send for VerifyingKey<D>where
D: Send,
impl<D> Sync for VerifyingKey<D>where
D: Sync,
impl<D> Unpin for VerifyingKey<D>where
D: Unpin,
impl<D> UnwindSafe for VerifyingKey<D>where
D: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
impl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
sourcefn to_pkcs1_der(&self) -> Result<Document, Error>
fn to_pkcs1_der(&self) -> Result<Document, Error>
Serialize a [
Document
] containing a PKCS#1-encoded public key.sourcefn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<String, Error>
Serialize this public key as PEM-encoded PKCS#1 with the given line ending.