@Override
    public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
        throws GeneralSecurityException {
      try {
        com.google.cloud.kms.v1.DecryptRequest decryptRequest =
            com.google.cloud.kms.v1.DecryptRequest.newBuilder()
                .setName(keyName)
                .setCiphertext(ByteString.copyFrom(ciphertext))
                .setAdditionalAuthenticatedData(ByteString.copyFrom(associatedData))
                .build();

        com.google.cloud.kms.v1.DecryptResponse decResponse = kmsClient.decrypt(decryptRequest);
        return decResponse.getPlaintext().toByteArray();
      } catch (RuntimeException e) {
        throw new GeneralSecurityException("decryption failed", e);
      }
    }
A GRPC-based client to communicate with Google Cloud KMS.
java_src/src/main/java/com/google/crypto/tink/integration/gcpkms/GcpKmsAead.java