From 2d90d900a356acbe42ebecdfb0bcb5a82e686dd1 Mon Sep 17 00:00:00 2001 From: jowparks Date: Tue, 13 Feb 2024 08:52:01 -0800 Subject: [PATCH] chore: code comment encryption (#4720) * chore: add code comment for encryption default nonce * lint fix --------- Co-authored-by: Rahul Patni --- ironfish-rust/src/serializing/aead.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ironfish-rust/src/serializing/aead.rs b/ironfish-rust/src/serializing/aead.rs index 8331c93dd3..5bff971365 100644 --- a/ironfish-rust/src/serializing/aead.rs +++ b/ironfish-rust/src/serializing/aead.rs @@ -8,6 +8,8 @@ use chacha20poly1305::{ChaCha20Poly1305, Key, Nonce}; pub const MAC_SIZE: usize = 16; +/// IMPORTANT: This method should only be used with unique keys as the nonce is zeroed! +/// /// Encrypt the plaintext using the given key, and append the MAC tag to the /// end of the output array to be decrypted and checked in one step below. ///