pub struct Encryptor { /* private fields */ }Expand description
An object that performs public key encryption
§Examples
let mut rng = botan::RandomNumberGenerator::new_system().unwrap();
let rsa = botan::Privkey::create("RSA", "2048", &mut rng).unwrap();
let rsa_pub = rsa.pubkey().unwrap();
let mut enc = botan::Encryptor::new(&rsa_pub, "OAEP(SHA-256)").unwrap();
let ctext = enc.encrypt(&[1,2,3], &mut rng).unwrap();Implementations§
Trait Implementations§
impl Send for Encryptor
impl Sync for Encryptor
Auto Trait Implementations§
impl Freeze for Encryptor
impl RefUnwindSafe for Encryptor
impl Unpin for Encryptor
impl UnwindSafe for Encryptor
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