pub struct EncryptingKey<D, MGD = D>{ /* 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>
impl<D, MGD> EncryptingKey<D, MGD>
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>
impl<D, MGD> Clone for EncryptingKey<D, MGD>
Source§fn clone(&self) -> EncryptingKey<D, MGD>
fn clone(&self) -> EncryptingKey<D, MGD>
Returns a duplicate 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>
impl<D, MGD> Debug for EncryptingKey<D, MGD>
Source§impl<D, MGD> RandomizedEncryptor for EncryptingKey<D, MGD>
impl<D, MGD> RandomizedEncryptor for EncryptingKey<D, MGD>
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.
Auto Trait Implementations§
impl<D, MGD> Freeze for EncryptingKey<D, MGD>
impl<D, MGD> RefUnwindSafe for EncryptingKey<D, MGD>where
D: RefUnwindSafe,
MGD: RefUnwindSafe,
impl<D, MGD> Send for EncryptingKey<D, MGD>
impl<D, MGD> Sync for EncryptingKey<D, MGD>
impl<D, MGD> Unpin for EncryptingKey<D, MGD>
impl<D, MGD> UnwindSafe for EncryptingKey<D, MGD>where
D: UnwindSafe,
MGD: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 120 bytes