Parameter
It is a password-hashing cryptographic function that takes an input and hashes it into a fixed size output.
GenerateBCryptHash(plaintext, options)
ColdFusion (2021 release): Added this function.
Parameter |
Description |
---|---|
plaintext |
(Required) The input string on which the hash function must be run. |
options |
(Optional) A struct with the following values:
|
<cfscript> stringToEncrypt = "Sample string" options = StructNew() options.rounds = 4 options.version = "$2a" bcrypted = GenerateBCryptHash(stringToEncrypt, options) writeDump(bcrypted) </cfscript>
$2a$04$3rPqpEgx3CIZEVybl3myYu/IxZMttS5.DAX/WMZN8LYTCtU0oJY9G
Přihlaste se ke svému účtu.