Skip to main content

Module argon2

Module argon2 

Source
Expand description

Argon2id (RFC 9106) password hashing function.

Argon2id is a memory-hard password hashing function that provides resistance against both side-channel attacks and GPU/ASIC brute-force attacks.

The memory-filling phase automatically selects the fastest compression kernel available on the running CPU: NEON (optionally with the SHA-3 xar extension) on AArch64, AVX2 on x86-64, and a portable scalar implementation everywhere else. When the std feature is enabled, the lanes are also filled in parallel; the worker threads are scoped to each call and never outlive it.

Structs§

Params
Argon2id parameters (RFC 9106).

Enums§

Argon2Error
Argon2 error type.

Functions§

decode_phc
Decode an Argon2id PHC string format into (params, salt, tag).
derive_key
Derive a key using Argon2id (RFC 9106).
encode_phc
Encode an Argon2id hash in the PHC string format: $argon2id$v=19$m=<memory>,t=<iterations>,p=<parallelism>$<salt_b64>$<hash_b64>
hash_password
Hash a password and return the PHC-encoded string.
verify_password
Verify a password against a PHC-encoded hash string.