An optional parameter to set the Customer-Supplied Encryption key for rewrite source object.
Application developers can generate their own encryption keys to protect the data in GCS. This is known as a Customer-Supplied Encryption key (CSEK). If the application provides a CSEK, GCS does not retain the key. The object data, the object CRC32 checksum, and its MD5 hash (if applicable) are all encrypted with this key, and the key is required to read any of these elements back.
Care must be taken to save and protect these keys, if lost, the data is not recoverable. Also, applications should avoid generating predictable keys, as this weakens the encryption.
This option is used only in rewrite operations and it defines the key used for the source object.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-02 UTC."],[[["This document outlines the `SourceEncryptionKey` structure within the Google Cloud Storage C++ library, providing access to various versions."],["The `SourceEncryptionKey` structure is used in rewrite operations to define the Customer-Supplied Encryption Key (CSEK) for the source object."],["CSEKs allow application developers to manage encryption keys for protecting data in Google Cloud Storage, with the caveat that these keys must be securely stored as data cannot be recovered without them."],["The library provides two methods for creating a `SourceEncryptionKey`: `FromBinaryKey` which accepts a 32-byte binary key, and `FromBase64Key` which takes a base64-encoded key that decodes to 32 bytes."],["The latest version available is version 2.37.0-rc, with a list of previous versions all the way down to 2.11.0, and an optional parameter used to set the Customer-Supplied Encryption key for rewrite source object."]]],[]]