aboutsummaryrefslogtreecommitdiff
path: root/chacha20poly1305/chacha20poly1305_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'chacha20poly1305/chacha20poly1305_test.go')
-rw-r--r--chacha20poly1305/chacha20poly1305_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/chacha20poly1305/chacha20poly1305_test.go b/chacha20poly1305/chacha20poly1305_test.go
index 82a4a36..b38970d 100644
--- a/chacha20poly1305/chacha20poly1305_test.go
+++ b/chacha20poly1305/chacha20poly1305_test.go
@@ -153,7 +153,7 @@ func TestRandom(t *testing.T) {
t.Run("X", func(t *testing.T) { f(t, NonceSizeX) })
}
-func benchamarkChaCha20Poly1305Seal(b *testing.B, buf []byte, nonceSize int) {
+func benchmarkChaCha20Poly1305Seal(b *testing.B, buf []byte, nonceSize int) {
b.ReportAllocs()
b.SetBytes(int64(len(buf)))
@@ -176,7 +176,7 @@ func benchamarkChaCha20Poly1305Seal(b *testing.B, buf []byte, nonceSize int) {
}
}
-func benchamarkChaCha20Poly1305Open(b *testing.B, buf []byte, nonceSize int) {
+func benchmarkChaCha20Poly1305Open(b *testing.B, buf []byte, nonceSize int) {
b.ReportAllocs()
b.SetBytes(int64(len(buf)))
@@ -204,17 +204,17 @@ func benchamarkChaCha20Poly1305Open(b *testing.B, buf []byte, nonceSize int) {
func BenchmarkChacha20Poly1305(b *testing.B) {
for _, length := range []int{64, 1350, 8 * 1024} {
b.Run("Open-"+strconv.Itoa(length), func(b *testing.B) {
- benchamarkChaCha20Poly1305Open(b, make([]byte, length), NonceSize)
+ benchmarkChaCha20Poly1305Open(b, make([]byte, length), NonceSize)
})
b.Run("Seal-"+strconv.Itoa(length), func(b *testing.B) {
- benchamarkChaCha20Poly1305Seal(b, make([]byte, length), NonceSize)
+ benchmarkChaCha20Poly1305Seal(b, make([]byte, length), NonceSize)
})
b.Run("Open-"+strconv.Itoa(length)+"-X", func(b *testing.B) {
- benchamarkChaCha20Poly1305Open(b, make([]byte, length), NonceSizeX)
+ benchmarkChaCha20Poly1305Open(b, make([]byte, length), NonceSizeX)
})
b.Run("Seal-"+strconv.Itoa(length)+"-X", func(b *testing.B) {
- benchamarkChaCha20Poly1305Seal(b, make([]byte, length), NonceSizeX)
+ benchmarkChaCha20Poly1305Seal(b, make([]byte, length), NonceSizeX)
})
}
}