static String getOperationEndpoint(String keyPath, String operation)
      throws GeneralSecurityException {
    String[] parts = keyPath.split("/");
    if (parts.length < 3 || !parts[parts.length - 2].equals("keys")) {
      throw new GeneralSecurityException(String.format("malformed URL"));
    }
    parts[parts.length - 2] = operation;
    return Arrays.asList(parts).stream().collect(Collectors.joining("/"));
  }
A {@link Aead} that forwards encryption/decryption requests to a key in <a
href="https://www.vaultproject.io/">Hashicorp Vault</a>.
java_src/src/main/java/com/google/crypto/tink/integration/hcvault/HcVaultAead.java