[][src]Struct ring::aead::OpeningKey

pub struct OpeningKey { /* fields omitted */ }

A key for authenticating and decrypting (“opening”) AEAD-protected data.

C analog: EVP_AEAD_CTX with direction evp_aead_open

Go analog: [crypto.cipher.AEAD]

Methods

impl OpeningKey[src]

pub fn new(
    algorithm: &'static Algorithm,
    key_bytes: &[u8]
) -> Result<OpeningKey, Unspecified>
[src]

Create a new opening key.

key_bytes must be exactly algorithm.key_len bytes long.

C analogs: EVP_AEAD_CTX_init_with_direction with direction evp_aead_open, EVP_AEAD_CTX_init.

Go analog: crypto.aes.NewCipher

pub fn algorithm(&self) -> &'static Algorithm[src]

The key's AEAD algorithm.

C analog: EVP_AEAD_CTX.aead

Auto Trait Implementations

impl Send for OpeningKey

impl Sync for OpeningKey

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]