Struct botan::Encryptor[][src]

pub struct Encryptor { /* fields omitted */ }

An object that performs public key encryption

Examples

let rng = botan::RandomNumberGenerator::new_system().unwrap();
let rsa = botan::Privkey::create("RSA", "2048", &rng).unwrap();
let rsa_pub = rsa.pubkey().unwrap();
let enc = botan::Encryptor::new(&rsa_pub, "OAEP(SHA-256)").unwrap();
let ctext = enc.encrypt(&[1,2,3], &rng).unwrap();

Methods

impl Encryptor
[src]

Create a new public key encryptor object

Encrypt a message using the provided public key

Trait Implementations

impl Debug for Encryptor
[src]

Formats the value using the given formatter. Read more

impl Drop for Encryptor
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl !Send for Encryptor

impl !Sync for Encryptor