Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
|
An optional parameter to set the Customer-Supplied Encryption key. More...
#include <google/cloud/storage/well_known_headers.h>
Static Public Member Functions | |
static EncryptionKey | FromBinaryKey (std::string const &key) |
Create an encryption key parameter from a binary key. More... | |
static EncryptionKey | FromBase64Key (std::string const &key) |
Creates an encryption key parameter from a key in base64 format. More... | |
static char const * | prefix () |
An optional parameter to set the Customer-Supplied Encryption key.
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 in read (download), write (upload), copy, and compose operations. Note that copy and compose operations use the same key for the source and destination objects.
|
static |
Creates an encryption key parameter from a key in base64 format.
key | a base64-encoded key, must have exactly 32 bytes when decoded. |
|
static |
Create an encryption key parameter from a binary key.
key | a binary key, must have exactly 32 bytes. |
|
inlinestatic |