Search in sources :

Example 6 with AsymmetricSignResponse

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

the class SyncAsymmetricSignCryptokeyversionnameDigest method syncAsymmetricSignCryptokeyversionnameDigest.

public static void syncAsymmetricSignCryptokeyversionnameDigest() throws Exception {
    // It may require modifications to work in your environment.
    try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
        CryptoKeyVersionName name = CryptoKeyVersionName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]");
        Digest digest = Digest.newBuilder().build();
        AsymmetricSignResponse response = keyManagementServiceClient.asymmetricSign(name, digest);
    }
}
Also used : CryptoKeyVersionName(com.google.cloud.kms.v1.CryptoKeyVersionName) Digest(com.google.cloud.kms.v1.Digest) AsymmetricSignResponse(com.google.cloud.kms.v1.AsymmetricSignResponse) KeyManagementServiceClient(com.google.cloud.kms.v1.KeyManagementServiceClient)

Aggregations

AsymmetricSignResponse (com.google.cloud.kms.v1.AsymmetricSignResponse)6 KeyManagementServiceClient (com.google.cloud.kms.v1.KeyManagementServiceClient)6 Digest (com.google.cloud.kms.v1.Digest)4 AsymmetricSignRequest (com.google.cloud.kms.v1.AsymmetricSignRequest)3 CryptoKeyVersionName (com.google.cloud.kms.v1.CryptoKeyVersionName)3 MessageDigest (java.security.MessageDigest)2 IOException (java.io.IOException)1