From 48f6d59655bdf6af7cfca1478ed521a6b8e89d62 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Sun, 31 May 2020 12:19:33 -0700 Subject: [PATCH] aead: fix `Tag` return values They were using `*::NonceSize` instead of `*::TagSize`. --- aead/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aead/src/lib.rs b/aead/src/lib.rs index 279937703..aaf7c9ffe 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -237,7 +237,7 @@ pub trait AeadInPlace { nonce: &Nonce, associated_data: &[u8], buffer: &mut [u8], - ) -> Result, Error>; + ) -> Result, Error>; /// Decrypt the message in-place, returning an error in the event the /// provided authentication tag does not match the given ciphertext. @@ -305,7 +305,7 @@ pub trait AeadMutInPlace { nonce: &Nonce, associated_data: &[u8], buffer: &mut [u8], - ) -> Result, Error>; + ) -> Result, Error>; /// Decrypt the message in-place, returning an error in the event the /// provided authentication tag does not match the given ciphertext. @@ -412,7 +412,7 @@ impl AeadMutInPlace for Alg { nonce: &Nonce, associated_data: &[u8], buffer: &mut [u8], - ) -> Result, Error> { + ) -> Result, Error> { ::encrypt_in_place_detached(self, nonce, associated_data, buffer) }