Package org.apache.shiro.crypto.hash
Interface HashSpi.HashFactory
- Enclosing interface:
HashSpi
public static interface HashSpi.HashFactory
-
Method Summary
Modifier and TypeMethodDescriptiongenerate(HashRequest hashRequest) Generates a hash from the given hash request.
-
Method Details
-
generate
Generates a hash from the given hash request.If the hash requests’ optional parameters are not set, the
HashSpi.HashFactoryimplementation 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 thisHashSpi.HashFactory.
-