Class Secret
java.lang.Object
org.forgerock.openam.scripting.api.secrets.Secret
Value object that models a secret as a value. This can be represented to the caller in either
StandardCharsets.UTF_8 or in the underlying byte[] form depending on what the
secret is. The caller is responsible for determining how to interpret the contained data.-
Constructor Summary
ConstructorsConstructorDescriptionSecret(GenericSecret genericSecret) Default constructor exposing required dependencies. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Access the secret value inbyteform.Provide aStandardCharsets.UTF_8rendering of theGenericSecret.
-
Constructor Details
-
Secret
Default constructor exposing required dependencies.- Parameters:
genericSecret- Non null.
-
-
Method Details
-
getAsUtf8
Provide aStandardCharsets.UTF_8rendering of theGenericSecret.- Returns:
- Non null String representation of the secret.
-
getAsBytes
public byte[] getAsBytes()Access the secret value inbyteform.- Returns:
- The
byte[]representation of the secret.
-