diff options
Diffstat (limited to 'pwned.go')
-rw-r--r-- | pwned.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -29,11 +29,11 @@ func NewPWDB(fn string) (*pwdb, error) { return nil, err } - const rs = 63 // V2 has fixed width of 63 bytes + const hash_length = 40 // sha1 is 40 chars + const rs = hash_length + 1 // sha1 + newline if stat.Size()%rs != 0 { - return nil, fmt.Errorf("Unexpected password file format (must be a text file with 63 char width starting with sha1)") + return nil, fmt.Errorf("Unexpected password file format (must be a text file with only sha1 + newline)") } - const hash_length = 40 // sha1 is 40 chars return &pwdb{f, int(stat.Size() / rs), rs, hash_length}, nil } |