code: private static byte[] getSecretBytes(final String secret, final boolean secretIsBase64Encoded) {
          return secretIsBase64Encoded ? new Base64(secret).decode() : secret.getBytes(UTF_8);
      }
docs: Convert secret to bytes honoring {@link RegisteredServiceProperty.RegisteredServiceProperties#TOKEN_SECRETS_ARE_BASE64_ENCODED}
  config parameter.
  
  @param secret                - String to be represented to byte[]
  @param secretIsBase64Encoded - is this a base64 encoded #secret?
  @return byte[] representation of #secret