Interface HashSpi.HashFactory

Enclosing interface:
HashSpi

public static interface HashSpi.HashFactory
  • Method Summary

    Modifier and Type
    Method
    Description
    generate(HashRequest hashRequest)
    Generates a hash from the given hash request.
  • Method Details

    • generate

      Hash generate(HashRequest hashRequest)
      Generates a hash from the given hash request.

      If the hash requests’ optional parameters are not set, the HashSpi.HashFactory implementation should use default parameters where applicable.

      If the hash requests’ salt is missing or empty, the implementation should create a salt with a default size.

      Parameters:
      hashRequest - the request to build a Hash from.
      Returns:
      a generated Hash according to the specs.
      Throws:
      IllegalArgumentException - if any of the parameters is outside of valid boundaries (algorithm-specific) or if the given algorithm is not applicable for this HashSpi.HashFactory.