tencentcloud-sdk-kms 3.0.561 → 3.0.563

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae59f967ab23fec03c05e190b36316102c611e22
4
- data.tar.gz: ae762449c7c987f3283492f5ffc0bb7cb3c1a3e1
3
+ metadata.gz: 54f935739f8c3f77e572ed5b4de15a927744102b
4
+ data.tar.gz: 25ed4054dd2d996111d8e58c1d9bb54239aaf1d9
5
5
  SHA512:
6
- metadata.gz: 64a53831a6d9b9be8a7cd18e87fb258c7d85db7d06d919ca24d1dc3b865c888c5db01e24751945b873829f951a072ea2e8348e55699303fd6f3e70af066accdc
7
- data.tar.gz: 1425b018ec7a5207293ac8006c66d4a93acffa6c47b56e43e90cbd6e3dda53cf08dc76035d113a8d7bd146e478d5be0d7bad6674d76126efc3da30632ab9c652
6
+ metadata.gz: 62fff1c16c96c285370ae261dca0c519e98950551e6eac72b08807765c3f77fe021eb3f22d8be92d99311d742c3320a013e82906e492a90a22b808608d0333f5
7
+ data.tar.gz: d4a0bd9c04c64ebc090c7b572d35513a7e89e3593404fa0310c6ca496c6a0bb64b5d5f15ed76f776df7ef35ce9fe25391da40b98c3bd15490483fe773642d756
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.561
1
+ 3.0.563
@@ -1038,6 +1038,102 @@ module TencentCloud
1038
1038
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1039
1039
  end
1040
1040
 
1041
+ # 本接口使用后量子密码算法密钥,解密密文,并得到明文数据。
1042
+
1043
+ # @param request: Request instance for PostQuantumCryptoDecrypt.
1044
+ # @type request: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoDecryptRequest`
1045
+ # @rtype: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoDecryptResponse`
1046
+ def PostQuantumCryptoDecrypt(request)
1047
+ body = send_request('PostQuantumCryptoDecrypt', request.serialize)
1048
+ response = JSON.parse(body)
1049
+ if response['Response'].key?('Error') == false
1050
+ model = PostQuantumCryptoDecryptResponse.new
1051
+ model.deserialize(response['Response'])
1052
+ model
1053
+ else
1054
+ code = response['Response']['Error']['Code']
1055
+ message = response['Response']['Error']['Message']
1056
+ reqid = response['Response']['RequestId']
1057
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1058
+ end
1059
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1060
+ raise e
1061
+ rescue StandardError => e
1062
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1063
+ end
1064
+
1065
+ # 本接口使用后量子密码算法密钥,可加密最多为4KB任意数据,可用于加密数据库密码,RSA Key,或其它较小的敏感信息。对于应用的数据加密,使用GenerateDataKey生成的DataKey进行本地数据的加解密操作。
1066
+
1067
+ # @param request: Request instance for PostQuantumCryptoEncrypt.
1068
+ # @type request: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoEncryptRequest`
1069
+ # @rtype: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoEncryptResponse`
1070
+ def PostQuantumCryptoEncrypt(request)
1071
+ body = send_request('PostQuantumCryptoEncrypt', request.serialize)
1072
+ response = JSON.parse(body)
1073
+ if response['Response'].key?('Error') == false
1074
+ model = PostQuantumCryptoEncryptResponse.new
1075
+ model.deserialize(response['Response'])
1076
+ model
1077
+ else
1078
+ code = response['Response']['Error']['Code']
1079
+ message = response['Response']['Error']['Message']
1080
+ reqid = response['Response']['RequestId']
1081
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1082
+ end
1083
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1084
+ raise e
1085
+ rescue StandardError => e
1086
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1087
+ end
1088
+
1089
+ # 使用后量子密码算法签名验签密钥进行签名。
1090
+
1091
+ # @param request: Request instance for PostQuantumCryptoSign.
1092
+ # @type request: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoSignRequest`
1093
+ # @rtype: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoSignResponse`
1094
+ def PostQuantumCryptoSign(request)
1095
+ body = send_request('PostQuantumCryptoSign', request.serialize)
1096
+ response = JSON.parse(body)
1097
+ if response['Response'].key?('Error') == false
1098
+ model = PostQuantumCryptoSignResponse.new
1099
+ model.deserialize(response['Response'])
1100
+ model
1101
+ else
1102
+ code = response['Response']['Error']['Code']
1103
+ message = response['Response']['Error']['Message']
1104
+ reqid = response['Response']['RequestId']
1105
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1106
+ end
1107
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1108
+ raise e
1109
+ rescue StandardError => e
1110
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1111
+ end
1112
+
1113
+ # 使用后量子密码算法密钥对签名进行验证。
1114
+
1115
+ # @param request: Request instance for PostQuantumCryptoVerify.
1116
+ # @type request: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoVerifyRequest`
1117
+ # @rtype: :class:`Tencentcloud::kms::V20190118::PostQuantumCryptoVerifyResponse`
1118
+ def PostQuantumCryptoVerify(request)
1119
+ body = send_request('PostQuantumCryptoVerify', request.serialize)
1120
+ response = JSON.parse(body)
1121
+ if response['Response'].key?('Error') == false
1122
+ model = PostQuantumCryptoVerifyResponse.new
1123
+ model.deserialize(response['Response'])
1124
+ model
1125
+ else
1126
+ code = response['Response']['Error']['Code']
1127
+ message = response['Response']['Error']['Message']
1128
+ reqid = response['Response']['RequestId']
1129
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1130
+ end
1131
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1132
+ raise e
1133
+ rescue StandardError => e
1134
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1135
+ end
1136
+
1041
1137
  # 使用指定CMK对密文重新加密。
1042
1138
 
1043
1139
  # @param request: Request instance for ReEncrypt.
@@ -2032,6 +2032,183 @@ module TencentCloud
2032
2032
  end
2033
2033
  end
2034
2034
 
2035
+ # PostQuantumCryptoDecrypt请求参数结构体
2036
+ class PostQuantumCryptoDecryptRequest < TencentCloud::Common::AbstractModel
2037
+ # @param CiphertextBlob: 待解密的密文数据
2038
+ # @type CiphertextBlob: String
2039
+ # @param EncryptionPublicKey: PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。
2040
+ # @type EncryptionPublicKey: String
2041
+ # @param EncryptionAlgorithm: 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。
2042
+ # @type EncryptionAlgorithm: String
2043
+
2044
+ attr_accessor :CiphertextBlob, :EncryptionPublicKey, :EncryptionAlgorithm
2045
+
2046
+ def initialize(ciphertextblob=nil, encryptionpublickey=nil, encryptionalgorithm=nil)
2047
+ @CiphertextBlob = ciphertextblob
2048
+ @EncryptionPublicKey = encryptionpublickey
2049
+ @EncryptionAlgorithm = encryptionalgorithm
2050
+ end
2051
+
2052
+ def deserialize(params)
2053
+ @CiphertextBlob = params['CiphertextBlob']
2054
+ @EncryptionPublicKey = params['EncryptionPublicKey']
2055
+ @EncryptionAlgorithm = params['EncryptionAlgorithm']
2056
+ end
2057
+ end
2058
+
2059
+ # PostQuantumCryptoDecrypt返回参数结构体
2060
+ class PostQuantumCryptoDecryptResponse < TencentCloud::Common::AbstractModel
2061
+ # @param KeyId: CMK的全局唯一标识
2062
+ # @type KeyId: String
2063
+ # @param PlainText: 若调用时未提供 EncryptionPublicKey,该字段值为 Base64 编码的明文,需进行 Base64 解码以获取明文。
2064
+ # 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取明文。
2065
+ # @type PlainText: String
2066
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2067
+ # @type RequestId: String
2068
+
2069
+ attr_accessor :KeyId, :PlainText, :RequestId
2070
+
2071
+ def initialize(keyid=nil, plaintext=nil, requestid=nil)
2072
+ @KeyId = keyid
2073
+ @PlainText = plaintext
2074
+ @RequestId = requestid
2075
+ end
2076
+
2077
+ def deserialize(params)
2078
+ @KeyId = params['KeyId']
2079
+ @PlainText = params['PlainText']
2080
+ @RequestId = params['RequestId']
2081
+ end
2082
+ end
2083
+
2084
+ # PostQuantumCryptoEncrypt请求参数结构体
2085
+ class PostQuantumCryptoEncryptRequest < TencentCloud::Common::AbstractModel
2086
+ # @param KeyId: 调用CreateKey生成的CMK全局唯一标识符
2087
+ # @type KeyId: String
2088
+ # @param PlainText: 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K
2089
+ # @type PlainText: String
2090
+
2091
+ attr_accessor :KeyId, :PlainText
2092
+
2093
+ def initialize(keyid=nil, plaintext=nil)
2094
+ @KeyId = keyid
2095
+ @PlainText = plaintext
2096
+ end
2097
+
2098
+ def deserialize(params)
2099
+ @KeyId = params['KeyId']
2100
+ @PlainText = params['PlainText']
2101
+ end
2102
+ end
2103
+
2104
+ # PostQuantumCryptoEncrypt返回参数结构体
2105
+ class PostQuantumCryptoEncryptResponse < TencentCloud::Common::AbstractModel
2106
+ # @param CiphertextBlob: 加密后的密文,base64编码。注意:本字段中打包了密文和密钥的相关信息,不是对明文的直接加密结果,只有将该字段作为PostQuantumCryptoDecrypt接口的输入参数,才可以解密出原文。
2107
+ # @type CiphertextBlob: String
2108
+ # @param KeyId: 加密使用的CMK的全局唯一标识
2109
+ # @type KeyId: String
2110
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2111
+ # @type RequestId: String
2112
+
2113
+ attr_accessor :CiphertextBlob, :KeyId, :RequestId
2114
+
2115
+ def initialize(ciphertextblob=nil, keyid=nil, requestid=nil)
2116
+ @CiphertextBlob = ciphertextblob
2117
+ @KeyId = keyid
2118
+ @RequestId = requestid
2119
+ end
2120
+
2121
+ def deserialize(params)
2122
+ @CiphertextBlob = params['CiphertextBlob']
2123
+ @KeyId = params['KeyId']
2124
+ @RequestId = params['RequestId']
2125
+ end
2126
+ end
2127
+
2128
+ # PostQuantumCryptoSign请求参数结构体
2129
+ class PostQuantumCryptoSignRequest < TencentCloud::Common::AbstractModel
2130
+ # @param Message: Base64 编码的消息原文。消息原文的长度(Base64编码前的长度)不超过4096字节。
2131
+ # @type Message: String
2132
+ # @param KeyId: 密钥的唯一标识
2133
+ # @type KeyId: String
2134
+
2135
+ attr_accessor :Message, :KeyId
2136
+
2137
+ def initialize(message=nil, keyid=nil)
2138
+ @Message = message
2139
+ @KeyId = keyid
2140
+ end
2141
+
2142
+ def deserialize(params)
2143
+ @Message = params['Message']
2144
+ @KeyId = params['KeyId']
2145
+ end
2146
+ end
2147
+
2148
+ # PostQuantumCryptoSign返回参数结构体
2149
+ class PostQuantumCryptoSignResponse < TencentCloud::Common::AbstractModel
2150
+ # @param Signature: 签名值,Base64编码。可使用 PostQuantumCryptoVerify接口对签名值进行验证。
2151
+ # @type Signature: String
2152
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2153
+ # @type RequestId: String
2154
+
2155
+ attr_accessor :Signature, :RequestId
2156
+
2157
+ def initialize(signature=nil, requestid=nil)
2158
+ @Signature = signature
2159
+ @RequestId = requestid
2160
+ end
2161
+
2162
+ def deserialize(params)
2163
+ @Signature = params['Signature']
2164
+ @RequestId = params['RequestId']
2165
+ end
2166
+ end
2167
+
2168
+ # PostQuantumCryptoVerify请求参数结构体
2169
+ class PostQuantumCryptoVerifyRequest < TencentCloud::Common::AbstractModel
2170
+ # @param KeyId: 密钥的唯一标识
2171
+ # @type KeyId: String
2172
+ # @param SignatureValue: 签名值,通过调用KMS PostQuantumCryptoSign签名接口生成
2173
+ # @type SignatureValue: String
2174
+ # @param Message: Base64 编码的消息原文,消息原文的长度(Base64编码前的长度)不超过4096字节。
2175
+ # @type Message: String
2176
+
2177
+ attr_accessor :KeyId, :SignatureValue, :Message
2178
+
2179
+ def initialize(keyid=nil, signaturevalue=nil, message=nil)
2180
+ @KeyId = keyid
2181
+ @SignatureValue = signaturevalue
2182
+ @Message = message
2183
+ end
2184
+
2185
+ def deserialize(params)
2186
+ @KeyId = params['KeyId']
2187
+ @SignatureValue = params['SignatureValue']
2188
+ @Message = params['Message']
2189
+ end
2190
+ end
2191
+
2192
+ # PostQuantumCryptoVerify返回参数结构体
2193
+ class PostQuantumCryptoVerifyResponse < TencentCloud::Common::AbstractModel
2194
+ # @param SignatureValid: 签名是否有效。true:签名有效,false:签名无效。
2195
+ # @type SignatureValid: Boolean
2196
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2197
+ # @type RequestId: String
2198
+
2199
+ attr_accessor :SignatureValid, :RequestId
2200
+
2201
+ def initialize(signaturevalid=nil, requestid=nil)
2202
+ @SignatureValid = signaturevalid
2203
+ @RequestId = requestid
2204
+ end
2205
+
2206
+ def deserialize(params)
2207
+ @SignatureValid = params['SignatureValid']
2208
+ @RequestId = params['RequestId']
2209
+ end
2210
+ end
2211
+
2035
2212
  # ReEncrypt请求参数结构体
2036
2213
  class ReEncryptRequest < TencentCloud::Common::AbstractModel
2037
2214
  # @param CiphertextBlob: 需要重新加密的密文
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.561
4
+ version: 3.0.563
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-27 00:00:00.000000000 Z
11
+ date: 2023-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common