Struct rsa::oaep::EncryptingKey
source · pub struct EncryptingKey<D, MGD = D>where
D: Digest,
MGD: Digest + FixedOutputReset,{ /* private fields */ }
Expand description
Encryption key for PKCS#1 v1.5 encryption as described in RFC8017 § 7.1.
Implementations§
source§impl<D, MGD> EncryptingKey<D, MGD>where
D: Digest,
MGD: Digest + FixedOutputReset,
impl<D, MGD> EncryptingKey<D, MGD>where D: Digest, MGD: Digest + FixedOutputReset,
sourcepub fn new(key: RsaPublicKey) -> Self
pub fn new(key: RsaPublicKey) -> Self
Create a new verifying key from an RSA public key.
sourcepub fn new_with_label<S: AsRef<str>>(key: RsaPublicKey, label: S) -> Self
pub fn new_with_label<S: AsRef<str>>(key: RsaPublicKey, label: S) -> Self
Create a new verifying key from an RSA public key using provided label
Trait Implementations§
source§impl<D, MGD> Clone for EncryptingKey<D, MGD>where
D: Digest + Clone,
MGD: Digest + FixedOutputReset + Clone,
impl<D, MGD> Clone for EncryptingKey<D, MGD>where D: Digest + Clone, MGD: Digest + FixedOutputReset + Clone,
source§fn clone(&self) -> EncryptingKey<D, MGD>
fn clone(&self) -> EncryptingKey<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 EncryptingKey<D, MGD>where
D: Digest + Debug,
MGD: Digest + FixedOutputReset + Debug,
impl<D, MGD> Debug for EncryptingKey<D, MGD>where D: Digest + Debug, MGD: Digest + FixedOutputReset + Debug,
source§impl<D, MGD> RandomizedEncryptor for EncryptingKey<D, MGD>where
D: Digest,
MGD: Digest + FixedOutputReset,
impl<D, MGD> RandomizedEncryptor for EncryptingKey<D, MGD>where D: Digest, MGD: Digest + FixedOutputReset,
source§fn encrypt_with_rng<R: CryptoRngCore + ?Sized>(
&self,
rng: &mut R,
msg: &[u8]
) -> Result<Vec<u8>>
fn encrypt_with_rng<R: CryptoRngCore + ?Sized>( &self, rng: &mut R, msg: &[u8] ) -> Result<Vec<u8>>
Encrypt the given message.