Skip to main content

Hashing Identifiers for Partners and Advertisers

Rokt is aware of the importance and sensitivity of personally identifiable information (PII) and takes care to preserve the confidentiality and security of your customers data.

For Partners, we offer the ability to integrate either raw or hashed attributes such as email, mobile, billing zipcode via Web or Mobile SDK for each transaction.

What is hashing?​Direct link to What is hashing?​

Cryptographic hashes are functions that convert your data to a mix of numbers and letters which is practically impossible to reverse. They’re easy to generate, difficult to decipher, and unique for each value you hash. For example, slightly changing an email address generates a completely different hash value.

Get startedDirect link to Get started

To get started, you just need a list with the customer data you'd like to hash, such as a subscriber email addresses, mobile phone number or billing zip.

Rokt’s rules for hashing emailsDirect link to Rokt’s rules for hashing emails

Rokt uses the SHA-256 algorithm, originally published by the United States National Security Agency in 2001, to hash data.

RuleNotes
Maximum length264 Bits
CaseLower case only
SpacesNo spaces allowed
Strip white space on sidesRemove all leading and trailing spaces
Attributeemailsha256

Examples

Customer entersNormalizedSHA-256 (emailsha256)
Jane.Doe@Example.comjane.doe@example.com86e0b9e56c17cc4d12387e1949b85053fbe73bc3ce5a1188713a9d300cc6133d
JOHN.SMITH@EXAMPLE.ORGjohn.smith@example.org93e896f4510e2c4b58151e37c08720d6155c3998572cbbcab9cf5c28cda34145

Rokt’s rules for mobile phone numberDirect link to Rokt’s rules for mobile phone number

RuleNotes
Maximum length264 Bits
SpacesNo spaces allowed
Strip white space on sidesRemove all leading and trailing spaces
Number Format10 digits, no symbols (e.g. '1234567890')
Attributemobilesha256

Examples

Customer entersNormalizedSHA-256 (mobilesha256)
(555) 010-01235550100123f1641aea049f1ebb574235496803a8a07819787fcd4ffa825277228a1a7dbe2e
555.010.01995550100199a124e62a10c3eecaee6e567d3cf7343cdd38547d03ad7615cb02d06bdb4e3c2b

Rokt’s rules for UK and EU mobile phone numbersDirect link to Rokt’s rules for UK and EU mobile phone numbers

For mobile numbers in the UK and all EU countries, hash the number in international E.164 format, including the leading + and the country code. Do not hash the national format.

RuleNotes
Maximum length264 Bits
SpacesNo spaces allowed
Strip white space on sidesRemove all leading and trailing spaces
SymbolsRemove brackets, dashes, dots and spaces
Leading 0 (trunk prefix)Remove the national leading 0, including a bracketed (0), and add the country code
Number FormatE.164: +, country code, then the number, with no other symbols (e.g. '+447700900123')
National formatNot matched. Do not hash the number without its country code (e.g. '7700900123')
Attributemobilesha256

Rokt also matches the E.164 number without the + (e.g. '447700900123'), but we recommend including it.

Examples

Customer entersNormalizedSHA-256 (mobilesha256)
07700 900123 (UK)+447700900123a8acc3a90a7b4e4dc65e93db9240ed26523050ef754d63b75b5161de76781436
+44 (0)7700-900123+447700900123a8acc3a90a7b4e4dc65e93db9240ed26523050ef754d63b75b5161de76781436
06 1234 5678 (NL)+31612345678fab7be8a931d1088a82f6acf9e468aaf6a3accc07d5112ee5d6fca93281e1583
0151 12345678 (DE)+4915112345678536afd523e19dc83fccba822ef5e4ca646111314aaf0aa286667c5bea18dd70b

Rokt’s rules for hashing zipcodeDirect link to Rokt’s rules for hashing zipcode

RuleNotes
Maximum length264 Bits
SpacesNo spaces allowed
Strip white space on sidesRemove all leading and trailing spaces
Zipcode Formatzip4 (e.g. '12345-6789') or zipcode (e.g. '12345')
Attributezip4sha256 or zipsha256
Billing Zipcode Formatbillingzip4 (e.g. '12345-6789') or billingzipcode (e.g. '12345')
Attributebillingzip4sha256 or billingzipsha256

Examples

Customer entersNormalizedAttributeSHA-256
1234512345zipsha2565994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5
12345-678912345-6789zip4sha25609d6f6e0c0c781a6c49153db62c72e4d8b159f742a42e8c4cfb18fc2b9c44224
9876598765billingzipsha25679737ac46dad121166483e084a0727e5d6769fb47fa9b0b627eba4107e696078
98765-432198765-4321billingzip4sha25668475e975bb275a95bff06f30f5dcbf150f46ca59fb346ab2121e5887f67b750

Rokt’s rules for UK and EU postal codesDirect link to Rokt’s rules for UK and EU postal codes

Use the same attributes as for US zipcodes. Remove spaces and hyphens and convert letters to upper case before hashing. This applies to the UK and all EU countries. Keep the postal code as text, so leading zeros are not lost.

RuleNotes
Maximum length264 Bits
CaseUpper case only
SpacesNo spaces allowed
HyphensNo hyphens allowed
Strip white space on sidesRemove all leading and trailing spaces
Postal Code FormatUpper case, no spaces or hyphens (e.g. 'M33 4GF' becomes 'M334GF')
Attributezipsha256
Billing Postal Codebillingzipsha256 (same rule)

Examples

CountryCustomer entersNormalizedSHA-256
United KingdomM33 4GFM334GF18a674989cabb5f4b364b9c3fd71a3d19771d3970c767a71b7e47beda4f7cd80
Netherlands1234 ab1234ABe32db25a9baaa6af655fe65a861c9bd35af1868229e0e9d738236b4500626afb
Poland00-95000950157c5bb53cacd69115a429c3a9257890995f3410caf57a12e1959f70c7b3fbec
Germany1011510115ac7bb74de6884ffce919c15fef4193749d4588026c643973946713ac46da540d
Irelandd02 x285D02X2857d8719bacdf032d41b45278dce34c27c2752208d78f307a2ee61aaded09e002e
Italy0018400184fffc66ece607b66a0958619ca5808c80bf31a6972322eb106b0ab4d0eda73abb

Rokt’s rules for hashing nameDirect link to Rokt’s rules for hashing name

RuleNotes
Maximum length264 Bits
CaseLower case only
SpacesKeep spaces inside the name (e.g. 'mary ann')
Strip white space on sidesRemove all leading and trailing spaces
Attributefirstnamesha256 or lastnamesha256

Examples

Customer entersNormalizedAttributeSHA-256
Janejanefirstnamesha25681f8f6dde88365f3928796ec7aa53f72820b06db8664f5fe76a7eb13e24546a2
DOEdoelastnamesha256799ef92a11af918e3fb741df42934f3b568ed2d93ac1df74f1b8d41a27932a6f
Mary Annmary annfirstnamesha256343b97011010c3549fe7fcd6c226ed9431ea37b0b77ed78f6300a0098925faf1
Was this article helpful?