You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Normalized email address |`[email protected]`| Normalization is always the first step. |
64
65
| SHA-256 hash of normalized email address |`b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514`| This 64-character string is a hex-encoded representation of the 32-byte SHA-256. |
65
66
| Hex to Base64 encoding of SHA-256 hash |`tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=`| This 44-character string is a Base64-encoded representation of the 32-byte SHA-256.<br/>WARNING: The SHA-256 hash string in the example above is a hex-encoded representation of the hash value. You must Base64-encode the raw bytes of the hash or use a Base64 encoder that takes a hex-encoded value as input.<br/>Use this encoding for `email_hash` values sent in the request body. |
@@ -70,6 +71,21 @@ When applying Base64 encoding, be sure to Base64-encode the raw bytes of the has
70
71
71
72
For additional examples, see [Normalization Examples for Email](#normalization-examples-for-email).
72
73
74
+
## Normalization Examples for Email
75
+
76
+
The following table shows examples of original email addresses and the normalized and hashed values.
77
+
78
+
Some of the examples show email addresses that include the plus sign (+), with different domains. For `gmail` addresses, the plus sign and following characters, up to the `@` sign, are ignored in normalization. For other domains, these characters are included in the normalized value.
79
+
80
+
| Original Value | Normalized | Hashed and Base64-Encoded |
@@ -99,6 +115,7 @@ The following table shows an example of a simple input phone number, and the res
99
115
100
116
| Type | Example | Comments and Usage |
101
117
| :--- | :--- | :--- |
118
+
| Raw phone number |`1 (234) 567-8901`| N/A |
102
119
| Normalized phone number |`+12345678901`| Normalization is always the first step. |
103
120
| SHA-256 hash of normalized phone number |`10e6f0b47054a83359477dcb35231db6de5c69fb1816e1a6b98e192de9e5b9ee`|This 64-character string is a hex-encoded representation of the 32-byte SHA-256. |
104
121
| Hex to Base64 encoding of SHA-256 hash |`EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=`| This 44-character string is a Base64-encoded representation of the 32-byte SHA-256.<br/>NOTE: The SHA-256 hash is a hexadecimal value. You must use a Base64 encoder that takes a hex value as input. Use this encoding for `phone_hash` values sent in the request body. |
@@ -107,21 +124,6 @@ The following table shows an example of a simple input phone number, and the res
107
124
When applying Base64 encoding, be sure to use a function that takes a hex value as input. If you use a function that takes text as input, the result is a longer string which is invalid for the purposes of UID2.
108
125
:::
109
126
110
-
## Normalization Examples for Email
111
-
112
-
The following table shows examples of original email addresses and the normalized and hashed values.
113
-
114
-
Some of the examples show email addresses that include the plus sign (+), with different domains. For `gmail` addresses, the plus sign and following characters, up to the `@` sign, are ignored in normalization. For other domains, these characters are included in the normalized value.
115
-
116
-
| Original Value | Normalized | Hashed and Base64-Encoded |
For an example of how to generate email and phone hashes in JavaScript, see [Example Code: Hashing and Base-64 Encoding](../guides/integration-javascript-client-side#example-code-hashing-and-base-64-encoding).
0 commit comments