> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# bcrypt-low-cost

> A bcrypt password hash uses a work factor below the recommended minimum.

## What it flags

A literal bcrypt cost below the configured minimum (10 by default) passed to `hash`, `hashSync`, `genSalt` or `genSaltSync`.

## How to review or fix

Use a cost at or above your minimum and measure the hashing time. The work factor is 2 raised to the cost. An inline fix proposes 12 when that meets the configured minimum. For a higher minimum, choose the cost manually.

## Configuration

Set `minCost` in `loadwise.config.json` to an integer from 1 through 31. The default is 10.

```json theme={null}
{
  "rules": {
    "bcrypt-low-cost": { "level": "warn", "options": { "minCost": 12 } }
  }
}
```

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "bcrypt-low-cost": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.