17
17
flagNoAmbiguity = flag .Bool ("no-ambiguity" , false , "Avoid Ambiguous Characters?" )
18
18
flagNumChars = flag .Int ("num-chars" , 12 , "Number of characters in Password" )
19
19
flagPrintIndex = flag .Bool ("index" , false , "Print Index Value (1-indexed)" )
20
- flagSeed = flag .Int64 ("seed" , 0 , "Seed value for non-sequenced mode (ignored if zero)" )
20
+ flagSeed = flag .Uint64 ("seed" , 0 , "Seed value for non-sequenced mode (ignored if zero)" )
21
21
flagSequenced = flag .Bool ("sequenced" , false , "Generate passwords in a sequence" )
22
22
flagStartIdx = flag .String ("start" , "0" , "Index to start from in the sequence (1-indexed)" )
23
23
@@ -49,8 +49,8 @@ func main() {
49
49
}
50
50
printIndex := * flagPrintIndex
51
51
seed := * flagSeed
52
- if seed < = 0 {
53
- seed = time .Now ().UnixNano ()
52
+ if seed = = 0 {
53
+ seed = uint64 ( time .Now ().UnixNano () )
54
54
}
55
55
startIdx , ok := new (big.Int ).SetString (* flagStartIdx , 10 )
56
56
if ! ok {
@@ -76,7 +76,7 @@ func main() {
76
76
}
77
77
}
78
78
79
- func generateRandomPasswords (charset password.Charset , numChars int , count * big.Int , printIndex bool , seed int64 ) {
79
+ func generateRandomPasswords (charset password.Charset , numChars int , count * big.Int , printIndex bool , seed uint64 ) {
80
80
generator , err := password .NewGenerator (
81
81
password .WithCharset (charset ),
82
82
password .WithLength (numChars ),
0 commit comments