]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/cryptotest: fix typos in AEAD test comments
authorDavis Goodin <dagood@microsoft.com>
Fri, 27 Sep 2024 18:04:33 +0000 (11:04 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 30 Sep 2024 15:41:33 +0000 (15:41 +0000)
Some comments that describe the behavior being tested don't match the
test logic.

Fix the comments to match test logic and documented behavior.

Change-Id: I065d9d9069fa00bb865209f48e112456384c2b9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/616338
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/crypto/internal/cryptotest/aead.go

index a6107e541930d11c3e856c3b1d2f7c049feb6c31..85a9c92cf228ba33058173f8dc32b2ecfcda838b 100644 (file)
@@ -108,7 +108,7 @@ func TestAEAD(t *testing.T, mAEAD MakeAEAD) {
 
                // Test all combinations of plaintext and additional data lengths.
                for _, ptLen := range lengths {
-                       if ptLen <= 1 { // We need enough room for an overlap to occur.
+                       if ptLen <= 1 { // We need enough room for an inexact overlap to occur.
                                continue
                        }
                        for _, adLen := range lengths {
@@ -196,7 +196,7 @@ func TestAEAD(t *testing.T, mAEAD MakeAEAD) {
                                                rng.Read(longBuff)
                                                prefixes := [][]byte{shortBuff, longBuff}
 
-                                               // Check each prefix gets appended to by Seal with altering them.
+                                               // Check each prefix gets appended to by Seal without altering them.
                                                for _, prefix := range prefixes {
                                                        plaintext, addData := make([]byte, ptLen), make([]byte, adLen)
                                                        rng.Read(plaintext)
@@ -227,7 +227,7 @@ func TestAEAD(t *testing.T, mAEAD MakeAEAD) {
                                                rng.Read(longBuff)
                                                prefixes := [][]byte{shortBuff, longBuff}
 
-                                               // Check each prefix gets appended to by Open with altering them.
+                                               // Check each prefix gets appended to by Open without altering them.
                                                for _, prefix := range prefixes {
                                                        before, addData := make([]byte, adLen), make([]byte, ptLen)
                                                        rng.Read(before)