hashWithArgon2

fun String.hashWithArgon2(salt: ByteArray = generateSalt()): Argon2.Result

Hashes this string using the Argon2 algorithm with the specified or generated salt.

Return

A Result containing the hash and the salt used.

Parameters

salt

The salt to use for hashing (default: a newly generated salt via generateSalt).