v2.0.0
dbcrypt
Dart में jBCrypt का एक पोर्ट। इसमें निर्धारित कार्य कारक के साथ BCrypt का उपयोग करके पासवर्ड को एन्क्रिप्ट करने और पासवर्ड की जाँच करने की अनुमति है।
47लाइक 14.4 हज़ार30-दिन डाउनलोड140Pub अंक
AndroidiOSWebmacOSWindowsLinux
JBCrypt का डार्ट संस्करण
>=2.0.0 <3.0.0^1.16.4यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
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.
Add to your pubspec.yaml the following:
dependencies:
dbcrypt: ^2.0.0
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);
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