mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
benchmark new
This commit is contained in:
parent
9be175f1b0
commit
5c5e00310a
1 changed files with 14 additions and 0 deletions
|
@ -24,6 +24,20 @@ func BenchmarkDecrypt(b *testing.B) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkNewPbkdf2(b *testing.B) {
|
||||||
|
b.ResetTimer()
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
New([]byte("password"), nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkNewArgon2(b *testing.B) {
|
||||||
|
b.ResetTimer()
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
NewArgon2([]byte("password"), nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func BenchmarkEncryptChaCha(b *testing.B) {
|
func BenchmarkEncryptChaCha(b *testing.B) {
|
||||||
bob, _, _ := NewArgon2([]byte("password"), nil)
|
bob, _, _ := NewArgon2([]byte("password"), nil)
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue