---
id: "bcrypt_hash"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets", "cryptography"]
langs: ["common"]
quality: 78
url: "http://registry.apicrafter.io/datatype/bcrypt_hash"
---

# bcrypt password hash (`bcrypt_hash`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Password hash produced by bcrypt in Modular Crypt Format: $2, an optional version letter (a, b, x or y), $, a two-digit cost, $ and 53 characters of bcrypt Base64 (a 22-character salt and a 31-character hash).

- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets), Cryptographic identifiers (cryptography)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\$2[abxy]?\$[0-9]{2}\$[./A-Za-z0-9]{53}$
```

## Examples

- `$2y$10$PvHZA2qDCPtJ6C/JxFval.y80.N4NJBCHhyTY.XkcksghdCXe3oXG` — Hash of the word "example" made with htpasswd -B
- `$1$examples$9syBlMva027I.Vd2Z0JGl1` (invalid example) — MD5-crypt hash

## Supported by tools

- `semgrep`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Bcrypt>
- doc: <https://man.archlinux.org/man/crypt.5>

## Quality

Score 78/100. Missing: second example, mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/bcrypt_hash.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/bcrypt_hash.yaml>
