AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
This is the response object from the Decapsulate operation.
Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z
public class DecapsulateResponse : AmazonWebServiceResponse
The DecapsulateResponse type exposes the following members
| Name | Description | |
|---|---|---|
|
DecapsulateResponse() |
| Name | Type | Description | |
|---|---|---|---|
|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
|
EncapsulationAlgorithm | Amazon.KeyManagementService.EncapsulationAlgorithmSpec |
Gets and sets the property EncapsulationAlgorithm. The key encapsulation algorithm used to recover the shared secret. |
|
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
|
KeyId | System.String |
Gets and sets the property KeyId. The identifier of the ML-KEM KMS key used to decapsulate the shared secret. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
|
SharedSecret | System.IO.MemoryStream |
Gets and sets the property SharedSecret. The plaintext shared secret recovered from the encapsulated form. It is a 32-byte value that matches the shared secret held by the encapsulating party. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. |
Recovers a shared secret from its encapsulated ciphertext (SharedSecretCiphertextBlob) using the private key in an asymmetric ML-KEM KMS key. Your peer calls Encapsulate to generate the shared secret and ciphertext.
var client = new AmazonKeyManagementServiceClient();
var response = client.Decapsulate(new DecapsulateRequest
{
EncapsulationAlgorithm = "ML_KEM",
KeyId = "1234abcd-12ab-34cd-56ef-1234567890ab",
SharedSecretCiphertextBlob = new MemoryStream(<binary data>)
});
EncapsulationAlgorithmSpec encapsulationAlgorithm = response.EncapsulationAlgorithm;
string keyId = response.KeyId;
MemoryStream sharedSecret = response.SharedSecret;
.NET:
Supported in: 8.0 and newer
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer