password_strength 0.2.0 copy "password_strength: ^0.2.0" to clipboard
password_strength: ^0.2.0 copied to clipboard

A password strength estimator. Can be used to show the user whether the password they chose is strong against bruteforce or dictionary attacks.

example/main.dart

import 'dart:io';
import 'package:password_strength/password_strength.dart';

void main() {
  // Read a password from stdin.
  print('Please enter a password:');
  final password = stdin.readLineSync()!;

  // Estimate the password's strength.
  double strength = estimatePasswordStrength(password);

  // Print a response
  if (strength < 0.3) {
    print('This password is weak!');
  } else if (strength < 0.7) {
    print('This password is alright.');
  } else {
    print('This passsword is strong!');
  }
}
138
likes
160
points
193k
downloads

Publisher

verified publisherjulien-scholz.dev

Weekly Downloads

A password strength estimator. Can be used to show the user whether the password they chose is strong against bruteforce or dictionary attacks.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on password_strength