Conditions | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package auth |
||
32 | func VerifyPassword(password string) error { |
||
33 | // Convert password to byte array |
||
34 | passwordBytes := []byte(password) |
||
35 | if len(passwordBytes) < crypto.MinPasswordLength { |
||
36 | return errors.New("password too short") |
||
37 | } |
||
38 | |||
39 | if len(passwordBytes) > crypto.MaxPasswordLength { |
||
40 | return errors.New("password too long") |
||
41 | } |
||
42 | |||
43 | return nil |
||
44 | } |
||
45 |