Skip to content

Commit

Permalink
Ran go fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzcf committed Sep 13, 2023
1 parent 5a31b4b commit 492da96
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions benches/circl/shake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ import (
"testing"
)

const bytesToOutput = 10000;
const bytesToOutput = 10000

func BenchmarkSHAKE128(b *testing.B) {
input := make([]byte, 0, 34);
output := make([]byte, bytesToOutput);
input := make([]byte, 0, 34)
output := make([]byte, bytesToOutput)

xof := xof.SHAKE128.New()
_, err := xof.Write([]byte(input))
if err != nil {
b.Fatal(err)
}
xof := xof.SHAKE128.New()
_, err := xof.Write([]byte(input))
if err != nil {
b.Fatal(err)
}

for i := 0; i < b.N; i++ {
n, err := xof.Read(output)
if n != bytesToOutput || err != nil {
b.Fatal()
}
n, err := xof.Read(output)
if n != bytesToOutput || err != nil {
b.Fatal()
}
}
}

func BenchmarkSHAKE256(b *testing.B) {
input := make([]byte, 0, 34);
output := make([]byte, bytesToOutput)
input := make([]byte, 0, 34)
output := make([]byte, bytesToOutput)

xof := xof.SHAKE256.New()
_, err := xof.Write([]byte(input))
if err != nil {
b.Fatal(err)
}
xof := xof.SHAKE256.New()
_, err := xof.Write([]byte(input))
if err != nil {
b.Fatal(err)
}

for i := 0; i < b.N; i++ {
n, err := xof.Read(output)
if n != bytesToOutput || err != nil {
b.Fatal()
}
n, err := xof.Read(output)
if n != bytesToOutput || err != nil {
b.Fatal()
}
}
}

0 comments on commit 492da96

Please sign in to comment.