blob: 894e6daa9c8efcea6b6864c42b356fab8921d789 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package scrypt
import (
"flag"
)
var nFlag = flag.Int(
"n",
100,
"The number of iterations to execute",
)
func MainTest() {
flag.Parse()
n := *nFlag
password := []byte("password")
salt := []byte("salt0123456789abcdef0123456789abcdef")
input := HashInputT{
Password: password,
Salt: salt,
}
for i := 0; i < n; i++ {
_, err := Hash(input)
if err != nil {
panic(err)
}
}
}
|