Лабораторная 7: безопасность, mTLS и OpenBao, оценка 3

This commit is contained in:
Nurlygayanova Ekaterina
2026-11-13 12:41:35 +03:00
parent 20afc2c790
commit 4408471ed5
217 changed files with 21288 additions and 106 deletions
+16
View File
@@ -0,0 +1,16 @@
package password
import (
"context"
"testing"
)
func BenchmarkDefaultHash(b *testing.B) {
h := NewHasher(Default, 1)
b.ReportAllocs()
for i := 0; i < b.N; i++ {
if _, err := h.Hash(context.Background(), "synthetic-benchmark-password"); err != nil {
b.Fatal(err)
}
}
}