Type Definition crypto::ciphers::aes::Aes256Gcm [−][src]
type Aes256Gcm = Aes256Gcm;
This is supported on crate feature
aes
only.Trait Implementations
impl Aead for Aes256Gcm
[src]
impl Aead for Aes256Gcm
[src]type KeyLength = U32
The size of the key
required by this algorithm.
type NonceLength = U12
The size of the nonce
required by this algorithm.
type TagLength = U16
The size of the tag
produced by this algorithm.
const NAME: &'static str
[src]
fn encrypt(
key: &Key<Self>,
nonce: &Nonce<Self>,
associated_data: &[u8],
plaintext: &[u8],
ciphertext: &mut [u8],
tag: &mut Tag<Self>
) -> Result<()>
[src]
key: &Key<Self>,
nonce: &Nonce<Self>,
associated_data: &[u8],
plaintext: &[u8],
ciphertext: &mut [u8],
tag: &mut Tag<Self>
) -> Result<()>
Warning: type conversions on the tag type can be tricky. instead of &mut tag.try_into().unwrap()
use
(&mut tag).try_into().unwrap()
fn decrypt(
key: &Key<Self>,
nonce: &Nonce<Self>,
associated_data: &[u8],
plaintext: &mut [u8],
ciphertext: &[u8],
tag: &Tag<Self>
) -> Result<usize>
[src]
key: &Key<Self>,
nonce: &Nonce<Self>,
associated_data: &[u8],
plaintext: &mut [u8],
ciphertext: &[u8],
tag: &Tag<Self>
) -> Result<usize>
const KEY_LENGTH: usize
[src]
const NONCE_LENGTH: usize
[src]
const TAG_LENGTH: usize
[src]
fn try_encrypt(
key: &[u8],
nonce: &[u8],
associated_data: &[u8],
plaintext: &[u8],
ciphertext: &mut [u8],
tag: &mut [u8]
) -> Result<()>
[src]
key: &[u8],
nonce: &[u8],
associated_data: &[u8],
plaintext: &[u8],
ciphertext: &mut [u8],
tag: &mut [u8]
) -> Result<()>
fn try_decrypt(
key: &[u8],
nonce: &[u8],
associated_data: &[u8],
plaintext: &mut [u8],
ciphertext: &[u8],
tag: &[u8]
) -> Result<usize>
[src]
key: &[u8],
nonce: &[u8],
associated_data: &[u8],
plaintext: &mut [u8],
ciphertext: &[u8],
tag: &[u8]
) -> Result<usize>