The hash algorithm to use
OptionalcostCost factor/rounds for the algorithm
OptionalsaltSalt length in bytes
OptionalhashHash length in bytes
OptionalincludeWhether to include salt in output
OptionalparallelismParallelism parameter (for ARGON2)
OptionalblockBlock size parameter (for ARGON2)
Compare this DataType with another DataType for equality
The DataType to compare with
true if the types are equal, false otherwise
Serialize a value for storage based on this DataType
The value to serialize
The serialized value
Get the algorithm name
Check if this is a password hashing algorithm (slow hash) Password hashing algorithms are designed to be slow to prevent brute force
Check if this is a fast hash algorithm (checksums)
Get the configuration object for hashing libraries
Optionaldialect: string
ALGORITHM - data type for hash algorithms Used for storing hashed values (passwords, checksums, etc.) Can be used with VIRTUAL type for computed/hashed fields
Common output lengths:
Example