Argon2
Provides utilities for password hashing and verification using the Argon2 algorithm (ARGON2id variant).
Argon2 is a memory-hard password-hashing function designed to resist brute-force attacks. This implementation uses the Bouncy Castle library and provides methods for generating salts, hashing passwords, and verifying hashes. It uses predefined parameters for iterations, memory limit, parallelism, and hash length to balance security and performance.
The Companion object contains static methods for hashing and verification, along with extension functions for convenient use with String and ByteArray. The Result class encapsulates the hash and salt for easy handling.
See also
for HMAC-SHA256-based message authentication
for the random number generator used for salt generation