11 "go.cypherpunks.ru/balloon"
15 s := flag.Int("s", 1<<18, "Space cost, number of hash-sized blocks")
16 t := flag.Int("t", 2, "Time cost, rounds")
17 p := flag.Int("p", 4, "Number of threads")
18 saltHex := flag.String("salt", "", "Salt, hexadecimal, optional")
19 passwd := flag.String("passwd", "", "Password")
23 if len(*saltHex) == 0 {
24 salt = make([]byte, 8)
25 _, err = io.ReadFull(rand.Reader, salt)
27 salt, err = hex.DecodeString(*saltHex)
32 fmt.Println(hex.EncodeToString(balloon.H(sha512.New, []byte(*passwd), salt, *s, *t, *p)))