All Projects → jasonnam → Navajo Swift

jasonnam / Navajo Swift

Licence: mit
Password Validator & Strength Evaluator

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Navajo Swift

keepassxc-pwned
Check your keepassxc database against previously breached haveibeenpwned passwords
Stars: ✭ 25 (-76.42%)
Mutual labels:  password-strength
aaf-easypassword
🔒 Easy Password is password management application. This application uses pattern locks to manage information that requires security.
Stars: ✭ 28 (-73.58%)
Mutual labels:  password-strength
Haveibeenpwned Zxcvbn Lambda Api
Deploy your own secure API to estimate password strength and check haveibeenpwned for known matches - HTTPS by force, server not required, fire and brimstone sold separately 🔥
Stars: ✭ 57 (-46.23%)
Mutual labels:  password-strength
react-native-passmeter
Simple password strength meter for React Native.
Stars: ✭ 46 (-56.6%)
Mutual labels:  password-strength
vue-simple-password-meter
Vue Simple Password Meter is a simple password strength meter component written in vanilla js and extremly lightweight
Stars: ✭ 65 (-38.68%)
Mutual labels:  password-strength
Bewgor
Bull's Eye Wordlist Generator - Does your password rely on predictable patterns of accessible info?
Stars: ✭ 333 (+214.15%)
Mutual labels:  password-strength
Python Scripts
Collection of Various Python Script's.💻
Stars: ✭ 195 (+83.96%)
Mutual labels:  password-strength
Vue Password
A Vue.js password input component that includes a toggle to show the password and a customizable strength meter.
Stars: ✭ 94 (-11.32%)
Mutual labels:  password-strength
RockYou2021.txt
RockYou2021.txt is a MASSIVE WORDLIST compiled of various other wordlists. RockYou2021.txt DOES NOT CONTAIN USER:PASS logins!
Stars: ✭ 288 (+171.7%)
Mutual labels:  password-strength
Probable Wordlists
Version 2 is live! Wordlists sorted by probability originally created for password generation and testing - make sure your passwords aren't popular!
Stars: ✭ 7,312 (+6798.11%)
Mutual labels:  password-strength
jquery.pwstrength
A jQuery plugin to indicate the strength of passwords
Stars: ✭ 22 (-79.25%)
Mutual labels:  password-strength
checkforce.js
💪 A library that helps to perform tasks to test strength of passwords
Stars: ✭ 18 (-83.02%)
Mutual labels:  password-strength
Kaonashi
Wordlist, rules and masks from Kaonashi project (RootedCON 2019)
Stars: ✭ 353 (+233.02%)
Mutual labels:  password-strength
password-list
Password lists with top passwords to optimize bruteforce attacks
Stars: ✭ 174 (+64.15%)
Mutual labels:  password-strength
Pwned Passwords Django
Utilities for working with the Pwned Passwords database from Django.
Stars: ✭ 71 (-33.02%)
Mutual labels:  password-strength
ATGValidator
iOS validation framework with form validation support
Stars: ✭ 51 (-51.89%)
Mutual labels:  password-strength
pwdcalc
Take no risk and help your users to choose good passwords!
Stars: ✭ 11 (-89.62%)
Mutual labels:  password-strength
Passwordstrengthvalidator
Password-strength validator for Symfony
Stars: ✭ 98 (-7.55%)
Mutual labels:  password-strength
Dumb Passwords
Don't let your user be a victim of their own action
Stars: ✭ 77 (-27.36%)
Mutual labels:  password-strength
Passgan
A Deep Learning Approach for Password Guessing (https://arxiv.org/abs/1709.00440)
Stars: ✭ 704 (+564.15%)
Mutual labels:  password-strength

Navajo-Swift

Password Validator & Strength Evaluator

Navajo is named in honor of the famed code talkers of the Second World War.

Original Project

Navajo by Mattt Thompson

This project is not compatible with the original project.

Installation

Platform Swift 4.0 Travis-CI Carthage compatible Version

Carthage

github "jasonnam/Navajo-Swift"

CocoaPods

use_frameworks!
pod 'Navajo-Swift'
import Navajo_Swift

Manual

Just copy the files in Source folder into your project.

Usage

Evaluating Password Strength

Password strength is evaluated in terms of information entropy.

let password = passwordField.text ?? ""
let strength = Navajo.strength(ofPassword: password)

strengthLabel.text = Navajo.localizedString(forStrength: strength)

Validating Password

let lengthRule = LengthRule(min: 6, max: 24)
let uppercaseRule = RequiredCharacterRule(preset: .LowercaseCharacter)

validator = PasswordValidator(rules: [lengthRule, uppercaseRule])

if let failingRules = validator.validate(password) {
    validationLabel.textColor = .red
    validationLabel.text = failingRules.map({ return $0.localizedErrorDescription }).joined(separator: "\n")
} else {
    validationLabel.textColor = .green
    validationLabel.text = "Valid"
}

Available Validation Rules

  • Allowed Characters
  • Required Characters (custom, lowercase, uppercase, decimal, symbol)
  • Non-Dictionary Word
  • Minimum / Maximum Length
  • Predicate Match
  • Regular Expression Match
  • Block Evaluation

If you are using the Predicate and Regex rules, remember that when password is matching to them it is considered to be invalid. For example, we can check if users are using for example "password123" as their password by following rule object.

let rule = PredicateRule(predicate: NSPredicate(format: "SELF BEGINSWITH %@", "PASSWORD"))

For the block rule, it is considered to be invalid when the block returns true.

Localization

Keys for the localizable strings Localization Tutorial or check the demo app in the repository.

Password Strength

  • NAVAJO_VERY_WEAK
  • NAVAJO_WEAK
  • NAVAJO_REASONABLE
  • NAVAJO_STRONG
  • NAVAJO_VERY_STRONG

Password Validation

  • NAVAJO_ALLOWED_CHARACTER_ERROR
  • NAVAJO_REQUIRED_CHARACTER_REQUIRED_ERROR
  • NAVAJO_REQUIRED_CHARACTER_LOWERCASE_ERROR
  • NAVAJO_REQUIRED_CHARACTER_UPPERCASE_ERROR
  • NAVAJO_REQUIRED_CHARACTER_DECIMAL_DIGIT_ERROR
  • NAVAJO_REQUIRED_CHARACTER_SYMBOL_ERROR
  • NAVAJO_DICTIONARYWORD_ERROR
  • NAVAJO_LENGTH_ERROR
  • NAVAJO_PREDICATE_ERROR
  • NAVAJO_REGEX_ERROR
  • NAVAJO_BLOCK_ERROR

Contact

Any feedback and pull requests are welcome :)

Jason Nam
Email

License

Navajo-Swift is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].