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.
Encrypt
function has two primary use cases:
Unless you are moving encrypted data from one region to another, you don't use this
function to encrypt a generated data key within a region. You retrieve data keys already
encrypted by calling the GenerateDataKey or GenerateDataKeyWithoutPlaintext
function. Data keys don't need to be encrypted again by calling Encrypt
.
If you want to encrypt data locally in your application, you can use the GenerateDataKey
function to return a plaintext data encryption key and a copy of the key encrypted
under the customer master key (CMK) of your choosing.
Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.dll
Version: (assembly version)
public class EncryptRequest : AmazonKeyManagementServiceRequest IRequestEvents
The EncryptRequest type exposes the following members
Name | Description | |
---|---|---|
EncryptRequest() |
Name | Type | Description | |
---|---|---|---|
EncryptionContext | System.Collections.Generic.Dictionary<System.String, System.String> |
Gets and sets the property EncryptionContext.
Name/value pair that specifies the encryption context to be used for authenticated
encryption. If used here, the same value must be supplied to the |
|
GrantTokens | System.Collections.Generic.List<System.String> |
Gets and sets the property GrantTokens.
A list of grant tokens. For more information, go to Grant Tokens in the AWS Key Management Service Developer Guide. |
|
KeyId | System.String |
Gets and sets the property KeyId.
A unique identifier for the customer master key. This value can be a globally unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".
|
|
Plaintext | System.IO.MemoryStream |
Gets and sets the property Plaintext.
Data to be encrypted. |
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8
.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8