From: komuw Date: Wed, 28 Aug 2024 14:12:31 +0000 (+0000) Subject: crypto/cipher: update documentation for aead Open X-Git-Tag: go1.24rc1~1028 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c55a170083dc58611e5acb6535093d0cf4e43175;p=gostls13.git crypto/cipher: update documentation for aead Open The remaining capacity of dst should not overlap ciphertext. The previous wording was probably a copy paste mistake from aead Seal. Change-Id: Iaa28073f9ea90cbe2032c0c1149a78feab6c9239 GitHub-Last-Rev: fb54bc84c471648eb9d4c56492a8ff6d7db69b2b GitHub-Pull-Request: golang/go#69108 Reviewed-on: https://go-review.googlesource.com/c/go/+/609075 Reviewed-by: Filippo Valsorda Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Pratt Auto-Submit: Filippo Valsorda LUCI-TryBot-Result: Go LUCI --- diff --git a/src/crypto/cipher/gcm.go b/src/crypto/cipher/gcm.go index 505be50c6a..9b86b06c98 100644 --- a/src/crypto/cipher/gcm.go +++ b/src/crypto/cipher/gcm.go @@ -39,7 +39,7 @@ type AEAD interface { // value passed to Seal. // // To reuse ciphertext's storage for the decrypted output, use ciphertext[:0] - // as dst. Otherwise, the remaining capacity of dst must not overlap plaintext. + // as dst. Otherwise, the remaining capacity of dst must not overlap ciphertext. // // Even if the function fails, the contents of dst, up to its capacity, // may be overwritten.