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

# Argon2 password hash (PHC string) (`argon2_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 of Argon2 (RFC 9106), the winner of the Password Hashing Competition, in the PHC string format: $argon2id$ (or argon2i, argon2d), the version v=19, the memory, time and parallelism costs m, t and p, then the salt and the hash in Base64 without padding. Argon2id is the default of libsodium crypto_pwhash.

- 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`):

```
^\$argon2(?:id|i|d)\$(?:v=(?:16|19)\$)?m=[0-9]{1,10},t=[0-9]{1,10},p=[0-9]{1,3}(?:,keyid=[A-Za-z0-9+/]{0,11})?(?:,data=[A-Za-z0-9+/]{0,43})?\$[A-Za-z0-9+/]{11,64}\$[A-Za-z0-9+/]{16,86}$
```

## Examples

- `$argon2id$v=19$m=19456,t=2,p=1$ZXhhbXBsZXNhbHQ$iZkkU2r9X5jHLoSY5bV80kDSU5BEB+SBOn0Rw4bjgLQ` — Hash of the word "example" with the salt examplesalt (m=19456, t=2, p=1)
- `$2y$10$PvHZA2qDCPtJ6C/JxFval.y80.N4NJBCHhyTY.XkcksghdCXe3oXG` (invalid example) — bcrypt hash

## Sources

- doc: <https://www.rfc-editor.org/rfc/rfc9106>
- doc: <https://github.com/C2SP/C2SP/blob/main/phc-strings.md>
- wikipedia: <https://en.wikipedia.org/wiki/Argon2>

## Quality

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

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