aboutsummaryrefslogtreecommitdiff
path: root/bhash/bhash_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'bhash/bhash_test.go')
-rw-r--r--bhash/bhash_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/bhash/bhash_test.go b/bhash/bhash_test.go
index 0535d96..a49d656 100644
--- a/bhash/bhash_test.go
+++ b/bhash/bhash_test.go
@@ -20,6 +20,13 @@ func TestHash(t *testing.T) {
}
}
+func BenchmarkHash(b *testing.B) {
+ zero := make([]byte, 32)
+ for i := 0; i < b.N; i++ {
+ Hash(zero, zero)
+ }
+}
+
func TestPbkdf(t *testing.T) {
testCases := [][]byte{
{
@@ -108,3 +115,10 @@ func TestPbkdf(t *testing.T) {
})
}
}
+
+func BenchmarkPbkdf(b *testing.B) {
+ zero := make([]byte, 32)
+ for i := 0; i < b.N; i++ {
+ Pbkdf(zero, zero, 42, 32)
+ }
+}