-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add interoperable symmetric encryption system
PiperOrigin-RevId: 544660001 Source-Link: googleapis/googleapis@511319c Source-Link: googleapis/googleapis-gen@812def9 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuS21zLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MTJkZWY5NTk0ZTlmYTA4NzZlMGUwMTE5NTFkYzBiZWM3YTBhNWZkIn0=
- Loading branch information
1 parent
0567fa8
commit 9ce4e96
Showing
11 changed files
with
3,999 additions
and
873 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
....V1.GeneratedSnippets/KeyManagementServiceClient.RawDecryptRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudkms_v1_generated_KeyManagementService_RawDecrypt_async] | ||
using Google.Cloud.Kms.V1; | ||
using Google.Protobuf; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedKeyManagementServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for RawDecryptAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task RawDecryptRequestObjectAsync() | ||
{ | ||
// Create client | ||
KeyManagementServiceClient keyManagementServiceClient = await KeyManagementServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
RawDecryptRequest request = new RawDecryptRequest | ||
{ | ||
Name = "", | ||
Ciphertext = ByteString.Empty, | ||
AdditionalAuthenticatedData = ByteString.Empty, | ||
InitializationVector = ByteString.Empty, | ||
TagLength = 0, | ||
CiphertextCrc32C = 0L, | ||
AdditionalAuthenticatedDataCrc32C = 0L, | ||
InitializationVectorCrc32C = 0L, | ||
}; | ||
// Make the request | ||
RawDecryptResponse response = await keyManagementServiceClient.RawDecryptAsync(request); | ||
} | ||
} | ||
// [END cloudkms_v1_generated_KeyManagementService_RawDecrypt_async] | ||
} |
54 changes: 54 additions & 0 deletions
54
...d.Kms.V1.GeneratedSnippets/KeyManagementServiceClient.RawDecryptRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudkms_v1_generated_KeyManagementService_RawDecrypt_sync] | ||
using Google.Cloud.Kms.V1; | ||
using Google.Protobuf; | ||
|
||
public sealed partial class GeneratedKeyManagementServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for RawDecrypt</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void RawDecryptRequestObject() | ||
{ | ||
// Create client | ||
KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.Create(); | ||
// Initialize request argument(s) | ||
RawDecryptRequest request = new RawDecryptRequest | ||
{ | ||
Name = "", | ||
Ciphertext = ByteString.Empty, | ||
AdditionalAuthenticatedData = ByteString.Empty, | ||
InitializationVector = ByteString.Empty, | ||
TagLength = 0, | ||
CiphertextCrc32C = 0L, | ||
AdditionalAuthenticatedDataCrc32C = 0L, | ||
InitializationVectorCrc32C = 0L, | ||
}; | ||
// Make the request | ||
RawDecryptResponse response = keyManagementServiceClient.RawDecrypt(request); | ||
} | ||
} | ||
// [END cloudkms_v1_generated_KeyManagementService_RawDecrypt_sync] | ||
} |
54 changes: 54 additions & 0 deletions
54
....V1.GeneratedSnippets/KeyManagementServiceClient.RawEncryptRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudkms_v1_generated_KeyManagementService_RawEncrypt_async] | ||
using Google.Cloud.Kms.V1; | ||
using Google.Protobuf; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedKeyManagementServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for RawEncryptAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task RawEncryptRequestObjectAsync() | ||
{ | ||
// Create client | ||
KeyManagementServiceClient keyManagementServiceClient = await KeyManagementServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
RawEncryptRequest request = new RawEncryptRequest | ||
{ | ||
Name = "", | ||
Plaintext = ByteString.Empty, | ||
AdditionalAuthenticatedData = ByteString.Empty, | ||
PlaintextCrc32C = 0L, | ||
AdditionalAuthenticatedDataCrc32C = 0L, | ||
InitializationVector = ByteString.Empty, | ||
InitializationVectorCrc32C = 0L, | ||
}; | ||
// Make the request | ||
RawEncryptResponse response = await keyManagementServiceClient.RawEncryptAsync(request); | ||
} | ||
} | ||
// [END cloudkms_v1_generated_KeyManagementService_RawEncrypt_async] | ||
} |
53 changes: 53 additions & 0 deletions
53
...d.Kms.V1.GeneratedSnippets/KeyManagementServiceClient.RawEncryptRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudkms_v1_generated_KeyManagementService_RawEncrypt_sync] | ||
using Google.Cloud.Kms.V1; | ||
using Google.Protobuf; | ||
|
||
public sealed partial class GeneratedKeyManagementServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for RawEncrypt</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void RawEncryptRequestObject() | ||
{ | ||
// Create client | ||
KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.Create(); | ||
// Initialize request argument(s) | ||
RawEncryptRequest request = new RawEncryptRequest | ||
{ | ||
Name = "", | ||
Plaintext = ByteString.Empty, | ||
AdditionalAuthenticatedData = ByteString.Empty, | ||
PlaintextCrc32C = 0L, | ||
AdditionalAuthenticatedDataCrc32C = 0L, | ||
InitializationVector = ByteString.Empty, | ||
InitializationVectorCrc32C = 0L, | ||
}; | ||
// Make the request | ||
RawEncryptResponse response = keyManagementServiceClient.RawEncrypt(request); | ||
} | ||
} | ||
// [END cloudkms_v1_generated_KeyManagementService_RawEncrypt_sync] | ||
} |
Oops, something went wrong.