Interface HashingAlgorithm


public interface HashingAlgorithm
Hashing Algorithm. A common interface to interact with any system provided algorithms.
Author:
Paulo Lopes
  • Method Summary

    Modifier and Type
    Method
    Description
    hash(HashString hashString, String password)
    Algorithm specific implementation.
    id()
    return the symbolic name for the algorithm
    default boolean
    Should the encoded string use the default separator to split fields.
    default Set<String>
    return the list of param names required for this algorithm.
  • Method Details

    • id

      String id()
      return the symbolic name for the algorithm
      Returns:
      short id e.g.: sha512.
    • params

      default Set<String> params()
      return the list of param names required for this algorithm.
      Returns:
      set of param names.
    • hash

      String hash(HashString hashString, String password)
      Algorithm specific implementation.
      Returns:
      the hashed digest.
    • needsSeparator

      default boolean needsSeparator()
      Should the encoded string use the default separator to split fields.
      Returns:
      true by default.