public class GenerateDataKeyRequest extends AbstractModel
Constructor and Description |
---|
GenerateDataKeyRequest() |
GenerateDataKeyRequest(GenerateDataKeyRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getEncryptionAlgorithm()
Get Asymmetric encryption algorithm.
|
String |
getEncryptionContext()
Get JSON string of key-value pair.
|
String |
getEncryptionPublicKey()
Get PEM-encoded public key (2048-bit RSA/SM2 key), which can be used to encrypt the `Plaintext` returned.
|
String |
getKeyId()
Get Globally unique CMK ID
|
String |
getKeySpec()
Get Specifies the encryption algorithm and size of the `DataKey`.
|
Long |
getNumberOfBytes()
Get Length of the `DataKey`.
|
void |
setEncryptionAlgorithm(String EncryptionAlgorithm)
Set Asymmetric encryption algorithm.
|
void |
setEncryptionContext(String EncryptionContext)
Set JSON string of key-value pair.
|
void |
setEncryptionPublicKey(String EncryptionPublicKey)
Set PEM-encoded public key (2048-bit RSA/SM2 key), which can be used to encrypt the `Plaintext` returned.
|
void |
setKeyId(String KeyId)
Set Globally unique CMK ID
|
void |
setKeySpec(String KeySpec)
Set Specifies the encryption algorithm and size of the `DataKey`.
|
void |
setNumberOfBytes(Long NumberOfBytes)
Set Length of the `DataKey`.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public GenerateDataKeyRequest()
public GenerateDataKeyRequest(GenerateDataKeyRequest source)
public String getKeyId()
public void setKeyId(String KeyId)
KeyId
- Globally unique CMK IDpublic String getKeySpec()
public void setKeySpec(String KeySpec)
KeySpec
- Specifies the encryption algorithm and size of the `DataKey`. Valid values: AES_128, AES_256. Either `KeySpec` or `NumberOfBytes` must be specified.public Long getNumberOfBytes()
public void setNumberOfBytes(Long NumberOfBytes)
NumberOfBytes
- Length of the `DataKey`. If both `NumberOfBytes` and `KeySpec` are specified, `NumberOfBytes` will prevail. Minimum value: 1; maximum value: 1024. Either `KeySpec` or `NumberOfBytes` must be specified.public String getEncryptionContext()
public void setEncryptionContext(String EncryptionContext)
EncryptionContext
- JSON string of key-value pair. If this field is used, the same string should be entered when the returned `DataKey` is decrypted.public String getEncryptionPublicKey()
public void setEncryptionPublicKey(String EncryptionPublicKey)
EncryptionPublicKey
- PEM-encoded public key (2048-bit RSA/SM2 key), which can be used to encrypt the `Plaintext` returned. If this field is left empty, the `Plaintext` will not be encrypted.public String getEncryptionAlgorithm()
public void setEncryptionAlgorithm(String EncryptionAlgorithm)
EncryptionAlgorithm
- Asymmetric encryption algorithm. Valid values: `SM2` (C1C3C2 ciphertext is returned)`, `SM2_C1C3C2_ASN1` (C1C3C2 ASN1 ciphertext is returned), `RSAES_PKCS1_V1_5`, `RSAES_OAEP_SHA_1`, and `RSAES_OAEP_SHA_256`. This field is used in combination with `EncryptionPublicKey` for encryption. If it is left empty, an SM2 public key will be used by default.Copyright © 2023. All rights reserved.