xcvbnm 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 84

xcvbnm

This is a dart port of the great dropbox/zxcvbn library, a realistic password strength estimator.

This library is strong mode compliant.

Please note, that library did not port all functionality but is already used in production.

Usage

library xcvbnm.example.bin;

import 'package:xcvbnm/xcvbnm.dart';

main() {
  String password = "my_pwd_1";
  // Use the direct helper API
  Result result = new Xcvbnm().estimate(password);
  print(result.toMap());
}

Demo

Browser

Online demo dart code compiled with dart2js

Command line

$  dart bin/xcvbnm_demo.dart --help
  -h, --help     Usage help
  -m, --match    Max number max of match to display
                 (defaults to "4")
$ dart bin/xcvbnm_demo.dart
$ dart bin/xcvbnm_demo.dart 9IOksjdopwd
$ dart bin/xcvbnm_demo.dart "my password"
$ dart bin/xcvbnm_demo.dart pwd1 pwd2 -m 1

Development

Guidelines and format

Before each commit format at the root of the project

$ dartfmt -l 120 -w .

Test

Run all tests in multiple platforms

$ ./test/bin/run_tests.sh

1.0.0

  • Slight cleanup and 1.0.0 release

0.5.7

  • Remove all implicit cast issues

0.5.6

  • Fixed all dart 2.0 errors and warnings

0.5.5

  • Started Changelog
  • Made xcvbnm strong-mode compliant

example/example.dart

import 'package:xcvbnm/xcvbnm.dart';

final xcvbnm = new Xcvbnm();

void main() {
  final password = 'my_pwd_1';
  final Result result = xcvbnm.estimate(password);

  if (result.score < 3) {
    print('Password not strong enough. It can be cracked in '
        '${result.crackTimeDisplay}. ${result.feedback}');
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  xcvbnm: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:xcvbnm/xcvbnm.dart';
  
Version Uploaded Documentation Archive
1.0.0 Jul 25, 2018 Go to the documentation of xcvbnm 1.0.0 Download xcvbnm 1.0.0 archive
0.5.7 Jul 24, 2018 Go to the documentation of xcvbnm 0.5.7 Download xcvbnm 0.5.7 archive
0.5.6 Jun 15, 2018 Go to the documentation of xcvbnm 0.5.6 Download xcvbnm 0.5.6 archive
0.5.5 Jul 5, 2017 Go to the documentation of xcvbnm 0.5.5 Download xcvbnm 0.5.5 archive
0.5.4 Sep 5, 2016 Go to the documentation of xcvbnm 0.5.4 Download xcvbnm 0.5.4 archive
0.5.3 Apr 26, 2016 Go to the documentation of xcvbnm 0.5.3 Download xcvbnm 0.5.3 archive
0.5.2 Apr 18, 2016 Go to the documentation of xcvbnm 0.5.2 Download xcvbnm 0.5.2 archive
0.5.1 Apr 18, 2016 Go to the documentation of xcvbnm 0.5.1 Download xcvbnm 0.5.1 archive
0.5.0 Nov 17, 2015 Go to the documentation of xcvbnm 0.5.0 Download xcvbnm 0.5.0 archive
0.4.0 Nov 17, 2015 Go to the documentation of xcvbnm 0.4.0 Download xcvbnm 0.4.0 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
69
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
84
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:xcvbnm/xcvbnm.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <3.0.0
Dev dependencies
args any
browser any
test ^0.12.20