Struct rsa::oaep::DecryptingKey
source · pub struct DecryptingKey<D, MGD = D>where
D: Digest,
MGD: Digest + FixedOutputReset,{ /* private fields */ }
Expand description
Decryption key for PKCS#1 v1.5 decryption as described in RFC8017 § 7.1.
Implementations§
source§impl<D, MGD> DecryptingKey<D, MGD>where
D: Digest,
MGD: Digest + FixedOutputReset,
impl<D, MGD> DecryptingKey<D, MGD>where D: Digest, MGD: Digest + FixedOutputReset,
sourcepub fn new(key: RsaPrivateKey) -> Self
pub fn new(key: RsaPrivateKey) -> Self
Create a new verifying key from an RSA public key.
sourcepub fn new_with_label<S: AsRef<str>>(key: RsaPrivateKey, label: S) -> Self
pub fn new_with_label<S: AsRef<str>>(key: RsaPrivateKey, label: S) -> Self
Create a new verifying key from an RSA public key using provided label
Trait Implementations§
source§impl<D, MGD> Clone for DecryptingKey<D, MGD>where
D: Digest + Clone,
MGD: Digest + FixedOutputReset + Clone,
impl<D, MGD> Clone for DecryptingKey<D, MGD>where D: Digest + Clone, MGD: Digest + FixedOutputReset + Clone,
source§fn clone(&self) -> DecryptingKey<D, MGD>
fn clone(&self) -> DecryptingKey<D, MGD>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<D, MGD> Debug for DecryptingKey<D, MGD>where
D: Digest + Debug,
MGD: Digest + FixedOutputReset + Debug,
impl<D, MGD> Debug for DecryptingKey<D, MGD>where D: Digest + Debug, MGD: Digest + FixedOutputReset + Debug,
source§impl<D, MGD> Decryptor for DecryptingKey<D, MGD>where
D: Digest,
MGD: Digest + FixedOutputReset,
impl<D, MGD> Decryptor for DecryptingKey<D, MGD>where D: Digest, MGD: Digest + FixedOutputReset,
source§impl<D, MGD> RandomizedDecryptor for DecryptingKey<D, MGD>where
D: Digest,
MGD: Digest + FixedOutputReset,
impl<D, MGD> RandomizedDecryptor for DecryptingKey<D, MGD>where D: Digest, MGD: Digest + FixedOutputReset,
source§fn decrypt_with_rng<R: CryptoRngCore + ?Sized>(
&self,
rng: &mut R,
ciphertext: &[u8]
) -> Result<Vec<u8>>
fn decrypt_with_rng<R: CryptoRngCore + ?Sized>( &self, rng: &mut R, ciphertext: &[u8] ) -> Result<Vec<u8>>
Decrypt the given message.