Bcrypt icon

Bcrypt

Password hashing and comparison using bcrypt

Actions2

Compare

AI-generated

Summary

Compare a plain text string against a bcrypt hashed string to check if they match. Returns true if the plain text matches the hash, false otherwise.

Inputs

  • Plain Text (required) — The unhashed string to compare, typically a user-provided password.
  • Hashed Text (required) — The bcrypt hashed string to compare against, typically a stored password hash.

Output shape

a single JSON object

The object contains a boolean property matches which is true if the plain text matches the hashed text, and false otherwise.

Examples

Example 1: Verify a user's entered password against their stored hashed password.

Set 'Plain Text' to the password entered by the user and 'Hashed Text' to the stored bcrypt hash from your database.

Discussion