RB2B APIs use encrypted identifiers such as Hashed Email Addresses (HEMs) and Mobile Advertising IDs (MAIDs) to match visitors accurately and securely. For this matching to work as expected, it’s important to understand how RB2B processes these values and how you should prepare them before sending requests.
How RB2B Handles Encrypted Identifiers
RB2B standardizes all encrypted inputs by lowercasing the value before encryption. This applies to:
HEMs (email addresses hashed with MD5 or SHA256)
MAIDs and other encrypted device identifiers
This ensures consistency across all sources of incoming data.
Why Lowercasing Matters
Email addresses are case-insensitive, but their encrypted versions are not.
If the casing doesn’t match exactly, the encrypted output will also not match.
Example
Original email:
[email protected]Trimmed and lowercased:
[email protected]Encrypted HEM is generated from the lowercased version only.
If you hash the uppercase or mixed-case version, your resulting hash will not match RB2B’s hash of the same email.
What You Need To Do
Before encrypting an email on your end, make sure you:
Trim whitespace
Convert the email to lowercase
Hash the lowercase value using your chosen algorithm (MD5, SHA-256, etc.)
This guarantees that the encrypted HEM you send to RB2B aligns with the way RB2B encrypts data internally.
Recommended formatting approach
lower(to_hex(md5(cast(lower(trim(email)) AS varbinary)))) as md5
Following this pattern prevents unexpected mismatches and improves match rates across all RB2B API endpoints.
Verifying Your Hashing Logic
If you’re troubleshooting mismatched results:
Confirm the raw email was lowercased before hashing.
Re-hash the lowercased email and compare with the hash you’re sending.
Test a known value with RB2B’s
/hem_to_best_linkedinor related endpoints to validate your process.
Summary
RB2B encrypts all identifiers in lowercase.
You must lowercase emails before hashing to ensure a correct match.
Consistency in preprocessing directly improves match accuracy.
