It is a password-hashing cryptographic function that takes an input and hashes it into a fixed size output./nNOTE: BCrypt input is limited to 72 bytes.
generateBCryptHash(plaintext,options);
returns string
Name | Type | Required | Default | Description | Values | |
---|---|---|---|---|---|---|
plaintext | string | Yes | The input string to hash. | |||
options | struct | No | {“version”:”$2a”,”rounds”:10} | A struct containing the optional values: –version - Version of BCrypt hash to generate ($2a,$2y or $2b). (Default is “$2a”. The most current version is “$2b”) –rounds - Number of rounds to run the hash functions. (Default is 10.) |
/Users/garethedwards/development/github/cfdocs/docs/functions/generatebcrypthash.md | rounds |
This is an example of using the function with no options.
secretMsg=generateBCryptHash("My voice is my passport. Verify me.");writeDump(secretMsg)
This is an example of using the function with optional version specified.
secretMsg=generateBCryptHash("My voice is my passport. Verify me.",{"version":"$2b"});
writeDump(secretMsg)
This is an example of using the function with optional rounds specified.
secretMsg=generateBCryptHash("Setec Astronomy",{"rounds":15});writeDump(secretMsg)