public sealed class EncryptionKey : IEquatable<EncryptionKey>
An AES-256 key passed to the Google Cloud Storage servers via headers to allow objects to be encrypted at
rest using a client-supplied key rather than a server-supplied default key. An alternative to
customer-supplied encryption keys is to use customer-managed encryption keys, via Cloud KMS.
A "don't encrypt" key, used in call-specific options to indicate that a particular request should
not use encryption even if the client has a default encryption key.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis page details the \u003ccode\u003eEncryptionKey\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.Storage.V1\u003c/code\u003e namespace, used for AES-256 encryption with client-supplied keys for Google Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEncryptionKey\u003c/code\u003e class offers methods for creating keys from raw bytes (\u003ccode\u003eCreate\u003c/code\u003e) and generating random keys (\u003ccode\u003eGenerate\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEncryptionKey\u003c/code\u003e instances include properties \u003ccode\u003eBase64Hash\u003c/code\u003e and \u003ccode\u003eBase64Key\u003c/code\u003e, both base64-encoded strings representing the key's SHA-256 hash and the key itself, respectively, and the static property \u003ccode\u003eNone\u003c/code\u003e indicates when encryption should not occur.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eModifyRequest\u003c/code\u003e method can be used to add the appropriate encryption headers to an HTTP request unless the key is \u003ccode\u003eNone\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis page provides access to the documentation of various versions of the \u003ccode\u003eEncryptionKey\u003c/code\u003e, going from 3.4.0 to the latest version 4.11.0.\u003c/p\u003e\n"]]],[],null,[]]