Class GenerateDataKeyRequest
- java.lang.Object
-
- com.tencentcloudapi.common.AbstractModel
-
- com.tencentcloudapi.kms.v20190118.models.GenerateDataKeyRequest
-
public class GenerateDataKeyRequest extends AbstractModel
-
-
Field Summary
-
Fields inherited from class com.tencentcloudapi.common.AbstractModel
header, skipSign
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEncryptionAlgorithm()Get 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。StringgetEncryptionContext()Get key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串StringgetEncryptionPublicKey()Get PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。StringgetKeyId()Get CMK全局唯一标识符StringgetKeySpec()Get 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个LonggetNumberOfBytes()Get 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个voidsetEncryptionAlgorithm(String EncryptionAlgorithm)Set 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。voidsetEncryptionContext(String EncryptionContext)Set key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串voidsetEncryptionPublicKey(String EncryptionPublicKey)Set PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。voidsetKeyId(String KeyId)Set CMK全局唯一标识符voidsetKeySpec(String KeySpec)Set 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个voidsetNumberOfBytes(Long NumberOfBytes)Set 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个voidtoMap(HashMap<String,String> map, String prefix)Internal implementation, normal users should not use it.-
Methods inherited from class com.tencentcloudapi.common.AbstractModel
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
-
-
-
-
Constructor Detail
-
GenerateDataKeyRequest
public GenerateDataKeyRequest()
-
GenerateDataKeyRequest
public 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.
-
-
Method Detail
-
getKeyId
public String getKeyId()
Get CMK全局唯一标识符- Returns:
- KeyId CMK全局唯一标识符
-
setKeyId
public void setKeyId(String KeyId)
Set CMK全局唯一标识符- Parameters:
KeyId- CMK全局唯一标识符
-
getKeySpec
public String getKeySpec()
Get 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个- Returns:
- KeySpec 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个
-
setKeySpec
public void setKeySpec(String KeySpec)
Set 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个- Parameters:
KeySpec- 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个
-
getNumberOfBytes
public Long getNumberOfBytes()
Get 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个- Returns:
- NumberOfBytes 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个
-
setNumberOfBytes
public void setNumberOfBytes(Long NumberOfBytes)
Set 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个- Parameters:
NumberOfBytes- 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个
-
getEncryptionContext
public String getEncryptionContext()
Get key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串- Returns:
- EncryptionContext key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串
-
setEncryptionContext
public void setEncryptionContext(String EncryptionContext)
Set key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串- Parameters:
EncryptionContext- key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串
-
getEncryptionPublicKey
public String getEncryptionPublicKey()
Get PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。- Returns:
- EncryptionPublicKey PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。
-
setEncryptionPublicKey
public void setEncryptionPublicKey(String EncryptionPublicKey)
Set PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。- Parameters:
EncryptionPublicKey- PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。
-
getEncryptionAlgorithm
public String getEncryptionAlgorithm()
Get 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。- Returns:
- EncryptionAlgorithm 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。
-
setEncryptionAlgorithm
public void setEncryptionAlgorithm(String EncryptionAlgorithm)
Set 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。- Parameters:
EncryptionAlgorithm- 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。
-
-