PassCrypt class
Class for password hashing in scrypt and PBKDF2.
This version of PassCrypt is encoded, meaning that it expects all keys and IVs to be base64, and returns base64 encoded Strings. Plaintext should be UTF-8. For more flexibility, PassCryptRaw is recommended.
Constructors
- PassCrypt.pbkdf2({int iterations = 10000, required HmacHash algo})
- Initialize a PBKDF2-based PassCrypt.
- PassCrypt.scrypt({int cpu = 16384, int mem = 16, int par = 1})
- Initialize a Scrypt-based PassCrypt().
Properties
Methods
-
check(
{required String plain, required String hashed, required String salt, int len = 32}) → bool - Checks hashed password given salt, plaintext, length, and hashedtext.
-
hash(
{required String salt, required String inp, int len = 32}) → String -
Hashes password given salt, text, and length.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited