Files
create-task-apcomp/password/password.go
2026-02-23 07:45:30 -05:00

19 lines
464 B
Go

package password
import (
"fmt"
)
// Check checks if password is valid, and returns message, and if its a strong password
func Check(input string, wordList, passwordList []string) (string, error) {
// Check if password is shorter than 8 characters
if len(input) < 8 {
return "Weak password", fmt.Errorf("password cannot be shorter than 8 characters")
}
// Check if password contains a number and a special character
for _, letter := range input {
}
}