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})
pepper is added all passwords that are hashed

Properties

hashCode int
The hash code for this object.
no setterinherited
pepper String
Added to all passwords that are hashed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendPassword({required String password, required String salt, required String passwordAppend}) String
Appends the password, salt, and pepper together based on the given passwordAppend.
generateSalt({int length = 32}) String
Generates a new salt of length length
hash({required String password, required String salt, required String method}) String
Hashes password with salt and pepper using the given method
override
individualHash(String toHash) String
Hashes toHash a single time
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
separateMethod(String method) → Tuple2<String, int>
Separate the method into 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