]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/cipher: update documentation for aead Open
authorkomuw <komuw05@gmail.com>
Wed, 28 Aug 2024 14:12:31 +0000 (14:12 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 4 Sep 2024 14:37:02 +0000 (14:37 +0000)
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 <filippo@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/crypto/cipher/gcm.go

index 505be50c6ae5b7579e0c3c3dbf0edb1996300c07..9b86b06c98084f388227b859e607e20457aa510c 100644 (file)
@@ -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.