Search in sources :

Example 6 with AsymmetricDecryptResponse

use of com.google.cloud.kms.v1.AsymmetricDecryptResponse in project gapic-generator-java by googleapis.

the class SyncAsymmetricDecryptStringBytestring method syncAsymmetricDecryptStringBytestring.

public static void syncAsymmetricDecryptStringBytestring() throws Exception {
    // It may require modifications to work in your environment.
    try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
        String name = CryptoKeyVersionName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]").toString();
        ByteString ciphertext = ByteString.EMPTY;
        AsymmetricDecryptResponse response = keyManagementServiceClient.asymmetricDecrypt(name, ciphertext);
    }
}
Also used : ByteString(com.google.protobuf.ByteString) AsymmetricDecryptResponse(com.google.cloud.kms.v1.AsymmetricDecryptResponse) ByteString(com.google.protobuf.ByteString) KeyManagementServiceClient(com.google.cloud.kms.v1.KeyManagementServiceClient)

Aggregations

AsymmetricDecryptResponse (com.google.cloud.kms.v1.AsymmetricDecryptResponse)6 KeyManagementServiceClient (com.google.cloud.kms.v1.KeyManagementServiceClient)6 AsymmetricDecryptRequest (com.google.cloud.kms.v1.AsymmetricDecryptRequest)3 CryptoKeyVersionName (com.google.cloud.kms.v1.CryptoKeyVersionName)3 ByteString (com.google.protobuf.ByteString)2 IOException (java.io.IOException)1