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