password_strength_verificator 1.0.1 copy "password_strength_verificator: ^1.0.1" to clipboard
password_strength_verificator: ^1.0.1 copied to clipboard

This package provides a function to check the strength of a password

Password Strength Verificator #

This package provides a function to check the strength of a password

Scoring password #

Each password starts with a score of 0 and earns one point for each item:

  • have lowercase letters
  • have capital letters
  • have numbers
  • have symbols

Identifying password strength #

  • Case the length of password is lower than required password length the password is tiny
  • Case the score is 0 or 1 the password is very week
  • Case the score is 2 the password is week
  • Case the score is 3 the password is good
  • Case the score is 4 the password is strong

Tiny: #

A password will be considered tiny when its length is shorter than required.

Example #

import 'package:password_strength_verificator/password_strength_verificator.dart';

void main(List<String> args) async {
  final verificator =  PasswordStrengthVerificator(requiredLength: 8);
  final tiny = await verificator('abcd');
  final veryWeek = await verificator('abcdefgh');
  final week = await verificator('abcdEFGH');
  final good = await verificator('abcdABC1');
  final strong = await verificator('aaBB11@@');

  print([tiny, week, strong, veryWeek, week, good]); 
  
  // shows: [PasswordStrength.tiny, PasswordStrength.week, PasswordStrength.strong, PasswordStrength.veryWeek, PasswordStrength.week, PasswordStrength.good]

}

0
likes
120
pub points
31%
popularity

Publisher

unverified uploader

This package provides a function to check the strength of a password

Homepage

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on password_strength_verificator