pub struct PkeyEncryptCtx { /* private fields */ }Expand description
RSA asymmetric encryption context.
Implementations§
Source§impl PkeyEncryptCtx
impl PkeyEncryptCtx
Sourcepub fn set_params(&mut self, params: &Params<'_>) -> Result<(), ErrorStack>
pub fn set_params(&mut self, params: &Params<'_>) -> Result<(), ErrorStack>
Configure parameters (e.g. RSA padding mode).
§Errors
Sourcepub fn encrypt(
&mut self,
plaintext: &[u8],
ciphertext: &mut [u8],
) -> Result<usize, ErrorStack>
pub fn encrypt( &mut self, plaintext: &[u8], ciphertext: &mut [u8], ) -> Result<usize, ErrorStack>
Sourcepub fn encrypt_len(&mut self, plaintext_len: usize) -> Result<usize, ErrorStack>
pub fn encrypt_len(&mut self, plaintext_len: usize) -> Result<usize, ErrorStack>
Query the ciphertext length for a given plaintext length.
§Errors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PkeyEncryptCtx
impl RefUnwindSafe for PkeyEncryptCtx
impl !Send for PkeyEncryptCtx
impl !Sync for PkeyEncryptCtx
impl Unpin for PkeyEncryptCtx
impl UnsafeUnpin for PkeyEncryptCtx
impl UnwindSafe for PkeyEncryptCtx
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