Class Argon2Util

java.lang.Object
eu.locklogin.api.encryption.argon.Argon2Util

public final class Argon2Util extends Object
LockLogin Argon2 utilities
  • Constructor Details

    • Argon2Util

      public Argon2Util(String key)
      Argon 2 utils class
      Parameters:
      key - the password/token to use
  • Method Details

    • hashPassword

      public String hashPassword(HashType type)
      Hash to argon password
      Parameters:
      type - the argon password type
      Returns:
      the hashed password if it's not argon
    • checkPassword

      public boolean checkPassword(String token, HashType type)
      Check if the argon password matches with the specified token
      Parameters:
      token - the player hashed password
      type - the encryption type
      Returns:
      if the password matches