Class: TencentCloud::Kms::V20190118::EncryptRequest

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20190118/models.rb

Overview

Encrypt请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyid = nil, plaintext = nil, encryptioncontext = nil) ⇒ EncryptRequest

Returns a new instance of EncryptRequest.



1265
1266
1267
1268
1269
# File 'lib/v20190118/models.rb', line 1265

def initialize(keyid=nil, plaintext=nil, encryptioncontext=nil)
  @KeyId = keyid
  @Plaintext = plaintext
  @EncryptionContext = encryptioncontext
end

Instance Attribute Details

#EncryptionContextObject

Parameters:

  • KeyId:

    调用CreateKey生成的CMK全局唯一标识符

  • Plaintext:

    被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K

  • EncryptionContext:

    key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符



1263
1264
1265
# File 'lib/v20190118/models.rb', line 1263

def EncryptionContext
  @EncryptionContext
end

#KeyIdObject

Parameters:

  • KeyId:

    调用CreateKey生成的CMK全局唯一标识符

  • Plaintext:

    被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K

  • EncryptionContext:

    key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符



1263
1264
1265
# File 'lib/v20190118/models.rb', line 1263

def KeyId
  @KeyId
end

#PlaintextObject

Parameters:

  • KeyId:

    调用CreateKey生成的CMK全局唯一标识符

  • Plaintext:

    被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K

  • EncryptionContext:

    key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符



1263
1264
1265
# File 'lib/v20190118/models.rb', line 1263

def Plaintext
  @Plaintext
end

Instance Method Details

#deserialize(params) ⇒ Object



1271
1272
1273
1274
1275
# File 'lib/v20190118/models.rb', line 1271

def deserialize(params)
  @KeyId = params['KeyId']
  @Plaintext = params['Plaintext']
  @EncryptionContext = params['EncryptionContext']
end