dbcrypt 1.0.0 copy "dbcrypt: ^1.0.0" to clipboard
dbcrypt: ^1.0.0 copied to clipboard

outdated

A port of jBCrypt to Dart. It allows to encrypt passwords using BCrypt with a configurable work factor to make it more expensive to create (and secure) as machines get faster. It also allows to check [...]

DBCrypt #

Port of jBCrypt to Dart.

This system hashes passwords using a version of Bruce Schneier's Blowfish block cipher with modifications designed to raise the cost of off-line password cracking. The computation cost of the algorithm is parameterised, so it can be increased as computers and Dart VM get faster.

Build Status

Installation #

Add to your pubspec.yaml the following:

dependencies:
  dbcrypt: ^1.0.0

Usage #

Hashing a password is easy:

import 'package:dbcrypt/dbcrypt.dart'

main() {
  var plainPassword = "P@55w0rd";
  var hashedPassword = new DBCrypt().hashpw(plainPassword, new DBCrypt().gensalt());
}

Comparing a plain and a hashed password is even easier:

var isCorrect = new DBCrypt().checkpw(plain, hashed);

Running Tests #

Dependencies are installed using the Pub Package Manager.

# For running the tests it needs the 'dart' executable on your path. 
# Execute the next command if it isn't already on your path:
export DART_SDK=path/to/dart/sdk

pub install

test/run.sh
44
likes
20
pub points
95%
popularity

Publisher

verified publishererlantz.net

A port of jBCrypt to Dart. It allows to encrypt passwords using BCrypt with a configurable work factor to make it more expensive to create (and secure) as machines get faster. It also allows to check passwords that have been encrypted using the original BCrypt algorithm and it's a, y and b revisions.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on dbcrypt