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§
source§impl<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 with an empty prefix.
§Note: unprefixed signatures are uncommon
In most cases you’ll want to use SigningKey::new_with_prefix
.
source§impl<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§
source§impl<D> AsRef<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
impl<D> AsRef<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
source§fn as_ref(&self) -> &RsaPublicKey
fn as_ref(&self) -> &RsaPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<D> Clone for VerifyingKey<D>where
D: Digest,
impl<D> Clone for VerifyingKey<D>where
D: Digest,
source§impl<D> Debug for VerifyingKey<D>where
D: Digest + Debug,
impl<D> Debug for VerifyingKey<D>where
D: Digest + Debug,
source§impl<D> DigestVerifier<D, Signature> for VerifyingKey<D>where
D: Digest,
impl<D> DigestVerifier<D, Signature> for VerifyingKey<D>where
D: Digest,
source§impl<D> EncodePublicKey for VerifyingKey<D>where
D: Digest,
impl<D> EncodePublicKey for VerifyingKey<D>where
D: Digest,
source§fn to_public_key_der(&self) -> Result<Document>
fn to_public_key_der(&self) -> Result<Document>
Serialize a
Document
containing a SPKI-encoded public key.source§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
.source§impl<D> From<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
impl<D> From<RsaPublicKey> for VerifyingKey<D>where
D: Digest,
source§fn from(key: RsaPublicKey) -> Self
fn from(key: RsaPublicKey) -> Self
Converts to this type from the input type.
source§impl<D> From<VerifyingKey<D>> for RsaPublicKeywhere
D: Digest,
impl<D> From<VerifyingKey<D>> for RsaPublicKeywhere
D: Digest,
source§fn from(key: VerifyingKey<D>) -> Self
fn from(key: VerifyingKey<D>) -> Self
Converts to this type from the input type.
source§impl<D> PrehashVerifier<Signature> for VerifyingKey<D>where
D: Digest,
impl<D> PrehashVerifier<Signature> for VerifyingKey<D>where
D: Digest,
Auto Trait Implementations§
impl<D> Freeze for VerifyingKey<D>
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
impl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
source§fn 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.source§fn 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.