@Override
  public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
      throws GeneralSecurityException {
    try {
      DecryptRequest request =
          new DecryptRequest()
              .encodeCiphertext(ciphertext)
              .encodeAdditionalAuthenticatedData(associatedData);
      DecryptResponse response =
          this.kmsClient
              .projects()
              .locations()
              .keyRings()
              .cryptoKeys()
              .decrypt(this.keyName, request)
              .execute();
      return toNonNullableByteArray(response.decodePlaintext());
    } catch (IOException e) {
      throw new GeneralSecurityException("decryption failed", e);
    }
  }
An HTTP-based client to communicate with Google Cloud KMS.
java_src/src/main/java/com/google/crypto/tink/integration/gcpkms/GcpKmsAead.java