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 v2 API, detailing its functionality as a data encryption key.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCryptoKey\u003c/code\u003e class can be implemented as either \u003ccode\u003eKmsWrapped\u003c/code\u003e, \u003ccode\u003eTransient\u003c/code\u003e, or \u003ccode\u003eUnwrapped\u003c/code\u003e, which is determined by the \u003ccode\u003eSourceCase\u003c/code\u003e property, and it implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe current latest version available for this class is 4.16.0, and the documentation also includes various previous versions back to 2.15.0, all of which are linked for access.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCryptoKey\u003c/code\u003e is part of the \u003ccode\u003eGoogle.Cloud.Dlp.V2\u003c/code\u003e namespace, and is located in the \u003ccode\u003eGoogle.Cloud.Dlp.V2.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCryptoKey\u003c/code\u003e class has two constructors, a default one, \u003ccode\u003eCryptoKey()\u003c/code\u003e, and another that takes an existing \u003ccode\u003eCryptoKey\u003c/code\u003e object as a parameter, \u003ccode\u003eCryptoKey(CryptoKey other)\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]