Interface Argon2HashFunction

All Superinterfaces:
io.micronaut.core.naming.Named

@Internal public interface Argon2HashFunction extends io.micronaut.core.naming.Named
Computes Argon2id hashes for an Argon2PasswordEncoder. Implementations must be safe for concurrent use and return the requested number of bytes.
Since:
5.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    hash(String rawPassword, byte[] salt, int memory, int iterations, int parallelism, int hashLength)
    Hashes a password using the requested parameters.

    Methods inherited from interface io.micronaut.core.naming.Named

    getName
  • Method Details

    • hash

      byte[] hash(String rawPassword, byte[] salt, int memory, int iterations, int parallelism, int hashLength)
      Hashes a password using the requested parameters.
      Parameters:
      rawPassword - the password
      salt - the salt
      memory - memory cost in kibibytes
      iterations - time cost
      parallelism - number of lanes
      hashLength - number of output bytes
      Returns:
      the Argon2id hash