argon2CheckHash

Verify the Argon2 hash of an input.

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

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

Compatibility

BoxLang:

Version 1.0.0+ Requires the bx-password-encrypt module

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 );

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub