Class Secret


  • @SupportedAll(scriptingApi=true)
    public class Secret
    extends Object
    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 Detail

      • Secret

        public Secret​(@Nonnull
                      GenericSecret genericSecret)
        Default constructor exposing required dependencies.
        Parameters:
        genericSecret - Non null.
    • Method Detail

      • getAsBytes

        public byte[] getAsBytes()
        Access the secret value in byte form.
        Returns:
        The byte[] representation of the secret.