public sealed class CryptoKey : IMessage<CryptoKey>, IEquatable<CryptoKey>, IDeepCloneable<CryptoKey>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class CryptoKey.
This is a data encryption key (DEK) (as opposed to
a key encryption key (KEK) stored by Cloud Key Management Service
(Cloud KMS).
When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate
IAM policy on the KEK to ensure an attacker cannot
unwrap the DEK.
[[["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 provides documentation for the \u003ccode\u003eCryptoKey\u003c/code\u003e class within the Google Cloud Data Loss Prevention (DLP) v2 API, detailing its properties, constructors, and inherited members.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCryptoKey\u003c/code\u003e class serves as a data encryption key (DEK), as opposed to a key encryption key (KEK) managed by Cloud Key Management Service (KMS), and is used for encrypting and decrypting data.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCryptoKey\u003c/code\u003e class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, supporting various functionalities like serialization, equality checks, and deep cloning.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation lists the different versions of \u003ccode\u003eCryptoKey\u003c/code\u003e, starting from version 2.15.0 to the most recent version, 4.16.0, allowing developers to access specific API versions as needed.\u003c/p\u003e\n"],["\u003cp\u003eThe class has three key properties: KmsWrapped, Transient, and Unwrapped, which allow different ways of handling keys: those wrapped using Cloud KMS, temporary keys, and unencrypted keys respectively.\u003c/p\u003e\n"]]],[],null,[]]