MethodEncryptDecrypt class

Used to encrypt and decrypt the method used in hashing passwords.

Constructors

MethodEncryptDecrypt({required int minHashes, required int maxHashes, required String saltBase64, required String ivBase64, Random? random})
minHashes and maxHashes sets the random number of possible hashes

Properties

hashCode int
The hash code for this object.
no setterinherited
ivBase64 String
Represents an initialization vector that's used as a cipher for the encrypted method
final
maxHashes int
Represents the inclusive maximum number of hashes for the generated methods
final
minHashes int
Represents the inclusive minimum number of hashes for the generated methods
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saltBase64 String
Represents a salt that's used as a cipher for the encrypted method
final

Methods

decryptMethod(String method, {bool checkMethodValid = true}) String
Decrypts the method using saltBase64 as a cipher, then checks that its valid
encryptMethod(String method) String
Checks that method is valid, then encrypts it using saltBase64 and ivBase64
generateEncryptedMethod() String
Same as generateMethod except it immediately calls encryptMethod before returning.
generateMethod() String
Generates a random valid unencrypted method within minHashes and maxHashes
isMethod(String method) bool
Checks whether method is a valid method or not.
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