Struct ring::aead::OpeningKey [−][src]
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]
impl OpeningKeypub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8]
) -> Result<OpeningKey, Unspecified>[src]
pub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8]
) -> Result<OpeningKey, Unspecified>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]
pub fn algorithm(&self) -> &'static AlgorithmThe key's AEAD algorithm.
C analog: EVP_AEAD_CTX.aead
Auto Trait Implementations
impl Send for OpeningKey
impl Send for OpeningKeyimpl Sync for OpeningKey
impl Sync for OpeningKey