password 0.1.1+2

  • README.md
  • Installing
  • Versions
  • 80

password

Pub Package Build Status Donate

A set of high-level APIs over PointyCastle to hash and verify passwords securely.<br> Heavily inspired on PHP's Password Hashing Functions.

Looking for two-way cryptography (encryption+decryption)? Please, visit encrypt.

API

Password.hash

Password.hash('password', new PBKDF2());
// $pcks$64,10000,64$530f8afbc74536b9a963b4f1c4cb738bcea7403d4d606b6e074ec5d3baf39d18$56158864e365bd78f6afda27f9a239bcb3f2b7a4773d4c0d0858c86266119d1e35aae9ca1a4777ed3d85c42caeed0c57cc7e09fe7d152d5d4d4ee08506c2b41a

Password.verify

Password.verify('password', previousOutput);
// true

Password.verify('secret', previousOutput);
// false

Defaults

In almost cases, you should rely on default PRNG for salts. It is cryptographically secure and unique for each password.

On the other hand, you are encouraged to change interations count for what your hardware can handle.

PBKDF2

DigestSHA-512
Block size64 bytes
Salt32 bytes Fortuna
Iteration count10000
Key length64 bytes

Waiting for Argon2.

Use this package as a library

1. Depend on it

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


dependencies:
  password: ^0.1.1+2

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:password/password.dart';
  
Version Uploaded Documentation Archive
0.1.1+2 Jul 23, 2018 Go to the documentation of password 0.1.1+2 Download password 0.1.1+2 archive
0.1.1+1 Jun 2, 2018 Go to the documentation of password 0.1.1+1 Download password 0.1.1+1 archive
0.1.1 Jun 2, 2018 Go to the documentation of password 0.1.1 Download password 0.1.1 archive
0.1.0 Jun 2, 2018 Go to the documentation of password 0.1.0 Download password 0.1.0 archive
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]
80
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, web, other

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

Issues and suggestions

Maintain CHANGELOG.md.

Changelog entries help clients to follow the progress in your code.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use password.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
pointycastle ^1.0.0-rc2 1.0.0-rc2
Transitive dependencies
analyzer 0.32.4
args 1.5.0
async 2.0.8
build 0.12.7+3
build_config 0.3.1+2
build_resolvers 0.2.2+2
build_runner 0.10.1+1
build_runner_core 0.3.1+4
built_collection 3.1.3
built_value 5.5.5 6.0.0
charcode 1.1.2
cli_util 0.1.3+2
code_builder 3.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.14.5
dart_style 1.1.3
fixnum 0.10.8
front_end 0.1.4
glob 1.1.7
graphs 0.1.2+1
html 0.13.3+3
http 0.11.3+17
http_multi_server 2.0.5
http_parser 3.1.3
io 0.3.3
json_annotation 1.1.0
kernel 0.3.4
logging 0.11.3+2
matcher 0.12.4
meta 1.1.6
mime 0.9.6+2
package_config 1.0.5
package_resolver 1.0.4
path 1.6.2
plugin 0.2.0+3
pool 1.3.6
pub_semver 1.4.2
pubspec_parse 0.1.2+2
quiver 2.0.0+1
reflectable 2.0.3
shelf 0.7.3+3
shelf_web_socket 0.2.2+4
source_span 1.4.1
stack_trace 1.9.3
stream_channel 1.6.8
stream_transform 0.0.14+1
string_scanner 1.0.4
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
web_socket_channel 1.0.9
yaml 2.1.15
Dev dependencies
test ^1.3.0