The Generate
method in the Random
and PIN
structs produces outputs with inconsistent lengths, regardless of the user-defined Length
field.
This is likely caused by this section of out code:
for i := 0; i < r.Length; i++ {
b := randomBytes[i]
if b >= maxByte {
continue
}
password[i] = charset[int(b)%len(charset)]
}
Need to rewrite the password generation loop to account for skipped characters.
Resolved by dc95129e.