- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
The Crypto extension adds support for cryptographic hash functions to convert or generate data layer values.
See the full list of available extensions.
In this article:
A cryptographic hash function is used to convert a text value containing sensitive information into an anonymous and unique, fixed-length string of characters. For example, hashing is commonly applied to a user's email address to anonymize the value while retaining its uniqueness. This extension offers a variety of commonly used hashing function algorithms, such as MD5 and SHA-1.
A data layer variable set in the extension is overwritten with the new hashed value. To generate a hashed value and preserve the original variable, use a second variable for the hashed value.
Once the Crypto extension is added, configure the following fields:
This example hashes a data layer variable named customer_email
:
> utag_data.customer_email
< "test@tealium.com"
With the Crypto extension configured to convert customer_email
using the SHA-1 cryptographic hash function, the new value becomes:
> utag_data.customer_email
< "05fcf31275aa13408ace62e84dac60ae4b805a65"
To preserve customer_email
and create a hashed value, use a second variable named customer_email_hash
. First, use the Set Data Values extension to initialize the hash variable customer_email_hash
to the value in customer_email
, and then convert it in the Crypto extension. This ensures you preserve the original value after creating the new hash value:
> utag_data.customer_email
< "test@tealium.com"
> utag_data.customer_email_hash
< "05fcf31275aa13408ace62e84dac60ae4b805a65"
Another option is to scope the Crypto extension only to the tags that use the hashed value. This preserves the original variable for all other tags.
Copyright All Rights Reserved © 2008-2021