Struct security_framework::os::macos::encrypt_transform::Builder
[−]
[src]
pub struct Builder { /* fields omitted */ }
A builder for encryption and decryption transform operations.
Methods
impl Builder
[src]
fn new() -> Builder
Creates a new Builder
with a default configuration.
fn padding(&mut self, padding: Padding) -> &mut Builder
Selects the padding scheme to use.
If not set, an appropriate scheme will be selected for you.
fn mode(&mut self, mode: Mode) -> &mut Builder
Selects the encryption mode to use.
If not set, an appropriate mode will be selected for you.
fn iv(&mut self, iv: CFData) -> &mut Builder
Sets the initialization vector to use.
If not set, an appropriate value will be supplied for you.
fn encrypt(&self, key: &SecKey, data: &CFData) -> Result<CFData, CFError>
Encrypts data with a provided key.
fn decrypt(&self, key: &SecKey, data: &CFData) -> Result<CFData, CFError>
Decrypts data with a provided key.