Class PBKDF2V2

java.lang.Object
overit.geocall.util.password.PasswordAlgo
overit.geocall.util.password.PBKDF2V2

public class PBKDF2V2 extends PasswordAlgo
Class that manages the PBKDF2 algorithm used to store the password. This implementation follow the guidelines of ACN (Agenzia per la Cybersicurezza Nazionale) that states to use PBKDF2 as algorithm with Hmac SHA512 and 210000 iterations.
  • Field Details

  • Constructor Details

    • PBKDF2V2

      public PBKDF2V2()
  • Method Details

    • generate

      public String generate(String password)
      Description copied from class: PasswordAlgo
      Generates the hashed password
      Specified by:
      generate in class PasswordAlgo
      Parameters:
      password - To hash
      Returns:
      The hashed password
    • check

      public boolean check(String password, String stored)
      Description copied from class: PasswordAlgo
      Checks if the stored hashed password corresponds
      Specified by:
      check in class PasswordAlgo
      Parameters:
      password - The password to check
      stored - The stored password to check
      Returns:
      true if the password corresponds to the stored one, false otherwise
    • getType

      public PasswordAlgo.Type getType()
      Description copied from class: PasswordAlgo
      Returns the type of algorithm used
      Specified by:
      getType in class PasswordAlgo
      Returns:
      The type of algorithm used