Bcryptjs icon

Bcryptjs

Perform password hashing and verification using bcryptjs

Compare Password

AI-generated

Summary

Compare a plaintext password against a bcrypt hash asynchronously to verify if they match.

Inputs

  • Password (required) — The plaintext password string to compare.
  • Hash (required) — The existing bcrypt hash string to compare the password against.
  • Options — Optional settings, including the 'Output Field Name' to specify where to store the boolean comparison result in the output JSON.

Output shape

a list of JSON items, each containing an added boolean field indicating if the provided password matches the given hash.

The output field name defaults to 'result' but can be customized. Each input item yields a corresponding output item with the comparison result.

Examples

Example 1: Check if user-provided passwords match stored bcrypt hashes.

Provide 'Password' and 'Hash' inputs, optionally set 'Output Field Name'; output will contain a boolean indicating match status.

Links

Discussion