From 70ac6ce2ee8545ab4e227b5fc5b7340577c974fe Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 28 Apr 2016 17:06:08 -0600 Subject: [PATCH] Clarify the usage of decryption API. --- src/zcash/NoteEncryption.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zcash/NoteEncryption.cpp b/src/zcash/NoteEncryption.cpp index 272c03c12..cabecd201 100644 --- a/src/zcash/NoteEncryption.cpp +++ b/src/zcash/NoteEncryption.cpp @@ -121,6 +121,8 @@ typename NoteDecryption::Plaintext NoteDecryption::decrypt NoteDecryption::Plaintext plaintext; + // Message length is always NOTEENCRYPTION_AUTH_BYTES less than + // the ciphertext length. if (crypto_aead_chacha20poly1305_ietf_decrypt(plaintext.begin(), NULL, NULL, ciphertext.begin(), NoteDecryption::CLEN,