PasswordHasher class
Hashes passwords using a method (Look at MethodEncryptDecrypt for more information) and a salt and pepper
Constructors
- PasswordHasher({required String pepper, Random? random})
-
pepperis added all passwords that are hashed
Properties
Methods
-
appendPassword(
{required String password, required String salt, required String passwordAppend}) → String -
Appends the
password,salt, and pepper together based on the givenpasswordAppend. -
generateSalt(
{int length = 32}) → String -
Generates a new salt of
lengthlength -
hash(
{required String password, required String salt, required String method}) → String -
Hashes
passwordwithsaltand pepper using the givenmethodoverride -
individualHash(
String toHash) → String -
Hashes
toHasha single time -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
separateMethod(
String method) → Tuple2< String, int> -
Separate the
methodinto the passwordAppend step and the repetition step -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited