Class DefaultPwdHashingStrategyImpl

java.lang.Object
com.skava.strategyimpl.DefaultPwdHashingStrategyImpl
All Implemented Interfaces:
PwdHashingStrategy

public class DefaultPwdHashingStrategyImpl extends Object implements PwdHashingStrategy
This class provides functionality of hashing the user password with salt value and checks the password.
Author:
Infosys Equinox
  • Constructor Details

    • DefaultPwdHashingStrategyImpl

      public DefaultPwdHashingStrategyImpl()
  • Method Details

    • hashPassword

      public String hashPassword(String pPassword, String psalt)
      This method is used for hashing user's password with salt value
      Specified by:
      hashPassword in interface PwdHashingStrategy
      Parameters:
      pPassword - Indicates the password of the user which is used for hashing.
      psalt - Indicated the salt value of the user which is used for hashing.
      Returns:
      The hashed password
    • checkPassword

      public boolean checkPassword(String plainPassword, String hashedPassword, String psalt)
      This method id used to check the hashed password with salt value.
      Specified by:
      checkPassword in interface PwdHashingStrategy
      Parameters:
      plainPassword - Indicates the password of the user which is used to check the hashed password with salt value.
      hashedPassword - Indicates the hashedPassword of the user which is used for checking the password.
      psalt - Indicates the salt value of the user which is used for checking the password.
      Returns:
      The hashed password