generateArgon2Hash

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
Required

variant string
Default: Argon2i

Values:
  • 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("CFDocs.org");
dump(hashedValue);
check = Argon2CheckHash( "CFDocs.org", hashedValue);
dump(check);

Fork me on GitHub