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 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>
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,
source§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
)