> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/bcrypthash.md).

# BCryptHash

Performs a BCrypt hash on the given string.

## Method Signature

```
BCryptHash(input=[string], iterations=[integer])
```

### Arguments

| Argument     | Type      | Required | Description                                                                                                                                                                                | Default |
| ------------ | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| `input`      | `string`  | `true`   | The string to perform secure hashing upon.                                                                                                                                                 |         |
| `iterations` | `integer` | `false`  | <p>The number of iterations to use in the hashing algorithm. Must be a multiple of 2 and between 2 and 30.<br>Note that a high number of iterations can take <em>days</em> to complete</p> |         |

## Examples

## Related

* [Argon2CheckHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/argon2checkhash.md)
* [ArgonHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/argonhash.md)
* [ArgonVerify](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/argonverify.md)
* [BCryptVerify](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/bcryptverify.md)
* [GenerateArgon2Hash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/generateargon2hash.md)
* [GenerateBCryptHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/generatebcrypthash.md)
* [GenerateSCryptHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/generatescrypthash.md)
* [SCryptHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/scrypthash.md)
* [SCryptVerify](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/scryptverify.md)
* [VerifyBCryptHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/verifybcrypthash.md)
* [VerifySCryptHash](/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/verifyscrypthash.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-framework/modularity/password-encryption/reference/built-in-functions/encrypt/bcrypthash.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
