~jamesponddotco/acopw#1: 
Inconsistent length in Random.Generate() and PIN.Generate() methods

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.

Status
RESOLVED CLOSED
Submitter
~jamesponddotco
Assigned to
No-one
Submitted
11 months ago
Updated
11 months ago
Labels
bug

~jamesponddotco REPORTED CLOSED 11 months ago

Resolved by dc95129e.

Register here or Log in to comment, or comment via email.