@@ -886,6 +886,107 @@ def update!(**args)
886
886
end
887
887
end
888
888
889
+ # Request message for KeyManagementService.Decapsulate.
890
+ class DecapsulateRequest
891
+ include Google ::Apis ::Core ::Hashable
892
+
893
+ # Required. The ciphertext produced from encapsulation with the named
894
+ # CryptoKeyVersion public key(s).
895
+ # Corresponds to the JSON property `ciphertext`
896
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
897
+ # @return [String]
898
+ attr_accessor :ciphertext
899
+
900
+ # Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If specified,
901
+ # KeyManagementService will verify the integrity of the received
902
+ # DecapsulateRequest.ciphertext using this checksum. KeyManagementService will
903
+ # report an error if the checksum verification fails. If you receive a checksum
904
+ # error, your client should verify that CRC32C(DecapsulateRequest.ciphertext) is
905
+ # equal to DecapsulateRequest.ciphertext_crc32c, and if so, perform a limited
906
+ # number of retries. A persistent mismatch may indicate an issue in your
907
+ # computation of the CRC32C checksum. Note: This field is defined as int64 for
908
+ # reasons of compatibility across different languages. However, it is a non-
909
+ # negative integer, which will never exceed 2^32-1, and can be safely
910
+ # downconverted to uint32 in languages that support this type.
911
+ # Corresponds to the JSON property `ciphertextCrc32c`
912
+ # @return [Fixnum]
913
+ attr_accessor :ciphertext_crc32c
914
+
915
+ def initialize ( **args )
916
+ update! ( **args )
917
+ end
918
+
919
+ # Update properties of this object
920
+ def update! ( **args )
921
+ @ciphertext = args [ :ciphertext ] if args . key? ( :ciphertext )
922
+ @ciphertext_crc32c = args [ :ciphertext_crc32c ] if args . key? ( :ciphertext_crc32c )
923
+ end
924
+ end
925
+
926
+ # Response message for KeyManagementService.Decapsulate.
927
+ class DecapsulateResponse
928
+ include Google ::Apis ::Core ::Hashable
929
+
930
+ # The resource name of the CryptoKeyVersion used for decapsulation. Check this
931
+ # field to verify that the intended resource was used for decapsulation.
932
+ # Corresponds to the JSON property `name`
933
+ # @return [String]
934
+ attr_accessor :name
935
+
936
+ # The ProtectionLevel of the CryptoKeyVersion used in decapsulation.
937
+ # Corresponds to the JSON property `protectionLevel`
938
+ # @return [String]
939
+ attr_accessor :protection_level
940
+
941
+ # The decapsulated shared_secret originally encapsulated with the matching
942
+ # public key.
943
+ # Corresponds to the JSON property `sharedSecret`
944
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
945
+ # @return [String]
946
+ attr_accessor :shared_secret
947
+
948
+ # Integrity verification field. A CRC32C checksum of the returned
949
+ # DecapsulateResponse.shared_secret. An integrity check of DecapsulateResponse.
950
+ # shared_secret can be performed by computing the CRC32C checksum of
951
+ # DecapsulateResponse.shared_secret and comparing your results to this field.
952
+ # Discard the response in case of non-matching checksum values, and perform a
953
+ # limited number of retries. A persistent mismatch may indicate an issue in your
954
+ # computation of the CRC32C checksum. Note: receiving this response message
955
+ # indicates that KeyManagementService is able to successfully decrypt the
956
+ # ciphertext. Note: This field is defined as int64 for reasons of compatibility
957
+ # across different languages. However, it is a non-negative integer, which will
958
+ # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
959
+ # that support this type.
960
+ # Corresponds to the JSON property `sharedSecretCrc32c`
961
+ # @return [Fixnum]
962
+ attr_accessor :shared_secret_crc32c
963
+
964
+ # Integrity verification field. A flag indicating whether DecapsulateRequest.
965
+ # ciphertext_crc32c was received by KeyManagementService and used for the
966
+ # integrity verification of the ciphertext. A false value of this field
967
+ # indicates either that DecapsulateRequest.ciphertext_crc32c was left unset or
968
+ # that it was not delivered to KeyManagementService. If you've set
969
+ # DecapsulateRequest.ciphertext_crc32c but this field is still false, discard
970
+ # the response and perform a limited number of retries.
971
+ # Corresponds to the JSON property `verifiedCiphertextCrc32c`
972
+ # @return [Boolean]
973
+ attr_accessor :verified_ciphertext_crc32c
974
+ alias_method :verified_ciphertext_crc32c? , :verified_ciphertext_crc32c
975
+
976
+ def initialize ( **args )
977
+ update! ( **args )
978
+ end
979
+
980
+ # Update properties of this object
981
+ def update! ( **args )
982
+ @name = args [ :name ] if args . key? ( :name )
983
+ @protection_level = args [ :protection_level ] if args . key? ( :protection_level )
984
+ @shared_secret = args [ :shared_secret ] if args . key? ( :shared_secret )
985
+ @shared_secret_crc32c = args [ :shared_secret_crc32c ] if args . key? ( :shared_secret_crc32c )
986
+ @verified_ciphertext_crc32c = args [ :verified_ciphertext_crc32c ] if args . key? ( :verified_ciphertext_crc32c )
987
+ end
988
+ end
989
+
889
990
# Request message for KeyManagementService.Decrypt.
890
991
class DecryptRequest
891
992
include Google ::Apis ::Core ::Hashable
0 commit comments