Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
package main
import (
"github.com/mimoo/GoKangarooTwelve/K12"
"golang.org/x/crypto/sha3"
"testing"
"bytes"
)
var out [32]byte
var customString = []byte("")
var payload = bytes.Repeat([]byte("a"), 10000)
func BenchmarkK12(b *testing.B) {
for n := 0; n < b.N; n++ {
K12.K12Sum(customString, payload, out[:])
}
}
func BenchmarkSHA3(b *testing.B) {
for n := 0; n < b.N; n++ {
sha3.Sum256(payload)
}
}
func BenchmarkSHAKE128(b *testing.B) {
for n := 0; n < b.N; n++ {
sha3.ShakeSum128(out[:], payload)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment