Interface HashingAlgorithm


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

      • 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.