hashAnswer
public static org.forgerock.json.JsonValue hashAnswer(CryptoService cryptoService,
org.forgerock.json.JsonValue answer)
throws org.forgerock.json.resource.InternalServerErrorException
Hashes the given answer. If already hashed, it is returned unchanged. Throws
InternalServerErrorException if the provided answer is not a String or cannot be hashed.
- Parameters:
cryptoService - an instance of the CryptoService to perform the hashing
answer - the value to be hashed.
- Returns:
- the hashed string value.
- Throws:
org.forgerock.json.resource.InternalServerErrorException - if the provided answer is not a String or cannot be hashed