Struct rsa::oaep::EncryptingKey  
source · 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§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>where
    D: Send,
    MGD: Send,
impl<D, MGD> Sync for EncryptingKey<D, MGD>where
    D: Sync,
    MGD: Sync,
impl<D, MGD> Unpin for EncryptingKey<D, MGD>where
    D: Unpin,
    MGD: Unpin,
impl<D, MGD> UnwindSafe for EncryptingKey<D, MGD>where
    D: UnwindSafe,
    MGD: 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)