Generates and returns an Argon2 hash of the input.

generateArgon2Hash(string [, variant] [, parallelismFactor] [, memoryCost] [, iterations]) → returns string

This function requires Lucee 5.3.8 and up.  Not supported on Adobe ColdFusion, etc.

generateArgon2Hash Argument Reference

input string

variant string
Default: Argon2i

  • Argon2i
  • Argon2d
  • Argon2id

parallelismFactor numeric
Default: 1

Degrees of parallelism, a number between 1 and 10.

memoryCost numeric
Default: 8

A number between 8 and 100000.

iterations numeric
Default: 1

A number between 1 and 20.

Links more information about generateArgon2Hash

Examples sample code invoking the generateArgon2Hash function

hashedValue = GenerateArgon2Hash("");
check = Argon2CheckHash( "", hashedValue);

Fork me on GitHub