计算密码安全等级,返回三种级别的枚举类型:
weak
medium
strong
static func computePasswordSecurityLevel(password: String) -> PasswordStrength
示例
let res = Util.computePasswordSecurityLevel(password: "123") // .weak