public class CryptoService extends Object
| Constructor and Description |
|---|
CryptoService() |
| Modifier and Type | Method and Description |
|---|---|
JsonValue |
hash(String plainTextValue,
String algorithm)
Hashes a string value.
|
boolean |
isHashed(JsonValue value)
Detects if a String is hashed.
|
boolean |
matches(String plainTextValue,
JsonValue value)
Returns true if the supplied plain text value of a field matches the supplied
hashed value.
|
public JsonValue hash(String plainTextValue, String algorithm) throws JsonCryptoException
plainTextValue - the string value to be hashed.algorithm - the hashing algorithm to use.JsonCryptoException - if an exception occurred while hashingpublic boolean isHashed(JsonValue value)
value - the JSON value to check.public boolean matches(String plainTextValue, JsonValue value) throws JsonCryptoException
plainTextValue - a String representing the plain text value of a fieldvalue - a JsonValue representing the hashed and encoded value of a fieldJsonCryptoException - if an exception occurred while matchingCopyright © 2025 Open Identity Platform Community. All rights reserved.