Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cng/chacha20poly1305_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ func TestChacha20Poly1305Random(t *testing.T) {
t.Run("Standard", func(t *testing.T) { f(t, 12) })
}

func benchmarkChaCha20Poly1305Seal(b *testing.B, buf []byte, nonceSize int) {
func benchmarkChaCha20Poly1305Seal(b *testing.B, buf []byte, testNonceSize int) {
b.ReportAllocs()
b.SetBytes(int64(len(buf)))

var key [32]byte
var nonce = make([]byte, nonceSize)
var nonce = make([]byte, testNonceSize)
var ad [13]byte
var out []byte

Expand All @@ -187,12 +187,12 @@ func benchmarkChaCha20Poly1305Seal(b *testing.B, buf []byte, nonceSize int) {
}
}

func benchmarkChaCha20Poly1305Open(b *testing.B, buf []byte, nonceSize int) {
func benchmarkChaCha20Poly1305Open(b *testing.B, buf []byte, testNonceSize int) {
b.ReportAllocs()
b.SetBytes(int64(len(buf)))

var key [32]byte
var nonce = make([]byte, nonceSize)
var nonce = make([]byte, testNonceSize)
var ad [13]byte
var ct []byte
var out []byte
Expand Down
Loading