argon2CheckHash

Verify the Argon2 hash of an input.

argon2CheckHash(string, hash [, variant]) → returns boolean

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

argon2CheckHash Argument Reference

input string
Required

The string input to test against the hash.

hash string
Required

An Argon2 hash value

variant string
Default: Argon2i

Values:
  • Argon2i
  • Argon2d
  • Argon2id

Links more information about argon2CheckHash

Examples sample code invoking the argon2CheckHash function

hashedValue = GenerateArgon2Hash("CFDocs.org");
dump(hashedValue);
check1 = Argon2CheckHash( "CFDocs.org", hashedValue);
dump( check1 );
check2 = Argon2CheckHash( "DifferentInput", hashedValue);
dump( check2 );

Fork me on GitHub