VerifyBCryptHash

Description

This function accepts a plain text and hashed value and compares the text with the hashed value.

Syntax

VerifyBCryptHash(plaintext, hashedString)

History

ColdFusion (2021 release): Added this function.

Parameters

Parameter

Description

plaintext

(Required) The input string on which the hash function must be run.

hashedString

(Required) The hashed output from the GenerateBCryptHash function.

Example

<cfscript> 
    stringToEncrypt = "Sample string" 
    options = StructNew() 
    options.rounds = 4 
    options.version = "$2a" 
    bcrypted = GenerateBCryptHash(stringToEncrypt, options) 
    verified=VerifyBCryptHash(stringToEncrypt,bcrypted) 
    writeDump(verified) 
</cfscript>

Output

YES

 Adobe

Получайте помощь быстрее и проще

Новый пользователь?

Adobe MAX 2024

Adobe MAX
— творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн

Adobe MAX

Творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн

Adobe MAX 2024

Adobe MAX
— творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн

Adobe MAX

Творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн