# Bcrypt Compare Hash

> Compare a string to a bcrypt hash.

- ID: `bcrypt_compare_hash`
- Type: Block
- Category: [Strings](https://inventor.bot/docs/reference/blocks/strings.md)

- Value block: it can be used directly inside expressions, e.g. `"Result: " + bcrypt_compare_hash(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `text` | yes | String to compare. | e.g. `"password"` |
| `hashed_string` | yes | Bcrypt hash to compare against. | e.g. `"$2a$10$..."` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `match` | Whether the string matches the hash. | e.g. `"true"` |

**Example**

```go
bcryptCompareHash := bcrypt_compare_hash(Args{text: "password", hashed_string: "$2a$10$..."})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Match: " + bcryptCompareHash,
})
```