Interface PasswordEncryptor

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean check​(java.lang.String password, java.lang.String encrypted)
      Returns true if the given plain text equals to the encrypted password.
      java.lang.String encrypt​(java.lang.String password)
      Encrypt the given password
      java.lang.String hashAlgorithmName()
      In order to distinguish which algorithm was used to hash the password, it needs a unique id.
    • Method Detail

      • encrypt

        java.lang.String encrypt​(java.lang.String password)
        Encrypt the given password
        Parameters:
        password -
        Returns:
      • check

        boolean check​(java.lang.String password,
                      java.lang.String encrypted)
        Returns true if the given plain text equals to the encrypted password.
        Parameters:
        password -
        encrypted -
        Returns:
      • hashAlgorithmName

        java.lang.String hashAlgorithmName()
        In order to distinguish which algorithm was used to hash the password, it needs a unique id. In particular, this is needed for check(java.lang.String, java.lang.String).
        Returns:
        the name of the algorithm