public sealed class CryptoDeterministicConfig : IMessage<CryptoDeterministicConfig>, IEquatable<CryptoDeterministicConfig>, IDeepCloneable<CryptoDeterministicConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class CryptoDeterministicConfig.
Pseudonymization method that generates deterministic encryption for the given
input. Outputs a base64 encoded representation of the encrypted output.
Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
A context may be used for higher security and maintaining
referential integrity such that the same identifier in two different
contexts will be given a distinct surrogate. The context is appended to
plaintext value being encrypted. On decryption the provided context is
validated against the value used during encryption. If a context was
provided during encryption, same context must be provided during decryption
as well.
If the context is not set, plaintext would be used as is for encryption.
If the context is set but:
there is no record present when transforming a given value or
the field is not present when transforming a given value,
plaintext would be used as is for encryption.
Note that case (1) is expected when an InfoTypeTransformation is
applied to both structured and unstructured ContentItems.
The custom info type to annotate the surrogate with.
This annotation will be applied to the surrogate by prefixing it with
the name of the custom info type followed by the number of
characters comprising the surrogate. The following scheme defines the
format: {info type name}({surrogate character count}):{surrogate}
For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
the surrogate is 'abc', the full replacement value
will be: 'MY_TOKEN_INFO_TYPE(3):abc'
This annotation identifies the surrogate when inspecting content using the
custom info type 'Surrogate'. This facilitates reversal of the
surrogate when it occurs in free text.
Note: For record transformations where the entire cell in a table is being
transformed, surrogates are not mandatory. Surrogates are used to denote
the location of the token and are necessary for re-identification in free
form text.
In order for inspection to work properly, the name of this info type must
not occur naturally anywhere in your data; otherwise, inspection may either
reverse a surrogate that does not correspond to an actual identifier
be unable to parse the surrogate and result in an error
Therefore, choose your custom info type name carefully after considering
what your data looks like. One way to select a name that has a high chance
of yielding reliable detection is to include one or more unicode characters
that are highly improbable to exist in your data.
For example, assuming your data is entered from a regular ASCII keyboard,
the symbol with the hex code point 29DD might be used like so:
⧝MY_TOKEN_TYPE.
[[["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 document provides reference information for the \u003ccode\u003eCryptoDeterministicConfig\u003c/code\u003e class within the Google Cloud Data Loss Prevention (DLP) v2 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCryptoDeterministicConfig\u003c/code\u003e class is used for pseudonymization through deterministic encryption, outputting a base64 encoded representation, and utilizing AES-SIV based on RFC 5297.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers functionalities for managing context, specifying encryption keys, and annotating surrogates with custom info types.\u003c/p\u003e\n"],["\u003cp\u003eThe document lists all the available versions, from 2.15.0 up to the most recent 4.16.0, for the class \u003ccode\u003eCryptoDeterministicConfig\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Data Loss Prevention v2 API - Class CryptoDeterministicConfig (4.19.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.19.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.18.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.18.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.17.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.17.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.16.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.15.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.14.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.13.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.12.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.11.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.10.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.9.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.8.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.7.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.6.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.5.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.4.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.3.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.2.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.1.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.0.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.5.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.4.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.3.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.2.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.16.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.15.0/Google.Cloud.Dlp.V2.CryptoDeterministicConfig) \n\n public sealed class CryptoDeterministicConfig : IMessage\u003cCryptoDeterministicConfig\u003e, IEquatable\u003cCryptoDeterministicConfig\u003e, IDeepCloneable\u003cCryptoDeterministicConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class CryptoDeterministicConfig.\n\nPseudonymization method that generates deterministic encryption for the given\ninput. Outputs a base64 encoded representation of the encrypted output.\nUses AES-SIV based on the RFC \u003chttps://tools.ietf.org/html/rfc5297\u003e. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CryptoDeterministicConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CryptoDeterministicConfig](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CryptoDeterministicConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CryptoDeterministicConfig](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CryptoDeterministicConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CryptoDeterministicConfig](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CryptoDeterministicConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Dlp.V2](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Dlp.V2.dll\n\nConstructors\n------------\n\n### CryptoDeterministicConfig()\n\n public CryptoDeterministicConfig()\n\n### CryptoDeterministicConfig(CryptoDeterministicConfig)\n\n public CryptoDeterministicConfig(CryptoDeterministicConfig other)\n\nProperties\n----------\n\n### Context\n\n public FieldId Context { get; set; }\n\nA context may be used for higher security and maintaining\nreferential integrity such that the same identifier in two different\ncontexts will be given a distinct surrogate. The context is appended to\nplaintext value being encrypted. On decryption the provided context is\nvalidated against the value used during encryption. If a context was\nprovided during encryption, same context must be provided during decryption\nas well.\n\nIf the context is not set, plaintext would be used as is for encryption.\nIf the context is set but:\n\n1. there is no record present when transforming a given value or\n2. the field is not present when transforming a given value,\n\nplaintext would be used as is for encryption.\n\nNote that case (1) is expected when an `InfoTypeTransformation` is\napplied to both structured and unstructured `ContentItem`s.\n\n### CryptoKey\n\n public CryptoKey CryptoKey { get; set; }\n\nThe key used by the encryption function. For deterministic encryption\nusing AES-SIV, the provided key is internally expanded to 64 bytes prior to\nuse.\n\n### SurrogateInfoType\n\n public InfoType SurrogateInfoType { get; set; }\n\nThe custom info type to annotate the surrogate with.\nThis annotation will be applied to the surrogate by prefixing it with\nthe name of the custom info type followed by the number of\ncharacters comprising the surrogate. The following scheme defines the\nformat: {info type name}({surrogate character count}):{surrogate}\n\nFor example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and\nthe surrogate is 'abc', the full replacement value\nwill be: 'MY_TOKEN_INFO_TYPE(3):abc'\n\nThis annotation identifies the surrogate when inspecting content using the\ncustom info type 'Surrogate'. This facilitates reversal of the\nsurrogate when it occurs in free text.\n\nNote: For record transformations where the entire cell in a table is being\ntransformed, surrogates are not mandatory. Surrogates are used to denote\nthe location of the token and are necessary for re-identification in free\nform text.\n\nIn order for inspection to work properly, the name of this info type must\nnot occur naturally anywhere in your data; otherwise, inspection may either\n\n- reverse a surrogate that does not correspond to an actual identifier\n- be unable to parse the surrogate and result in an error\n\nTherefore, choose your custom info type name carefully after considering\nwhat your data looks like. One way to select a name that has a high chance\nof yielding reliable detection is to include one or more unicode characters\nthat are highly improbable to exist in your data.\nFor example, assuming your data is entered from a regular ASCII keyboard,\nthe symbol with the hex code point 29DD might be used like so:\n⧝MY_TOKEN_TYPE."]]