Compare commits
No commits in common. "4609be7a9df886957b89003d34afb19ee509fc89" and "87fa1107d78e550290adf8ac9f47c7efd1ec1767" have entirely different histories.
4609be7a9d
...
87fa1107d7
11
main.go
11
main.go
@ -1,6 +1,6 @@
|
||||
// GoPass
|
||||
// Author: Maximilian Patterson
|
||||
// Version: 1.2.1
|
||||
// Version: 1.2.0
|
||||
package main
|
||||
|
||||
import (
|
||||
@ -18,15 +18,13 @@ func main() {
|
||||
// Take in all OS arg
|
||||
args := os.Args[1:]
|
||||
if len(args) < 1 {
|
||||
println("No password length specified! (ex: ./gopass 16)")
|
||||
return
|
||||
panic("No password length specified! (ex: ./gopass 16)")
|
||||
}
|
||||
|
||||
// Convert String arg to int
|
||||
size, err := strconv.Atoi(args[0])
|
||||
if err != nil {
|
||||
println("First argument supplied must be an integer! (ex: 16)")
|
||||
return
|
||||
panic("First argument supplied must be an integer! (ex: 16)")
|
||||
}
|
||||
|
||||
// Grab second argument (if it exists) and use it as a disallowed character(s)
|
||||
@ -52,8 +50,7 @@ func main() {
|
||||
var b [8]byte
|
||||
_, err = cryptorand.Read(b[:])
|
||||
if err != nil {
|
||||
println("Error securely seeding crypto/rand!")
|
||||
return
|
||||
panic("Error securely seeding crypto/rand!")
|
||||
}
|
||||
mathrand.Seed(int64(binary.LittleEndian.Uint64(b[:])))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user