Guides

Guides

Guides

Cryptography for Regulated Marketing Data: What Matters (and What Doesn't)

Your security team asks: "Do you cryptographically hash the data before sending it to ad platforms?"

The marketer freezes. They've heard the word "hashing" before. They know it's good. But they don't know if the answer is yes, or what it even means to answer correctly.

In regulated industries, the difference between hashing, encryption, and anonymization isn't academic — it determines whether sensitive data leaks, and whether your pipeline holds up in a security review.

The 3 Jobs Cryptography Does in Marketing Data

Cryptography isn't one thing. It's a set of tools that solve different problems. In marketing data pipelines, there are three jobs it can do:

Job

What It Means

Marketing Example

Confidentiality

Keep data private

Encrypt data at rest so a breach doesn't expose raw emails

Integrity

Detect unauthorized changes

Ensure data isn't altered in transit (usually via TLS) and changes are auditable

Minimization

Reduce exposure of raw identifiers

Hash emails before sending to ad platforms

Most conversations about "crypto hashing" in marketing are actually about minimization — reducing what raw data gets exposed to third parties. That's different from confidentiality (keeping secrets) or integrity (detecting tampering). Understanding which job you're trying to accomplish tells you which tool to use.

Hashing vs Encryption: The Critical Distinction

These terms get used interchangeably. They shouldn't be.

Encryption is reversible. You lock data with a key, and you can unlock it with the same key (or a paired key). Think of it like a padlock: anyone with the right key can open it.

Hashing is a one-way transform. You put data in, you get a fixed-length output, and you can't reverse it to get the original. Think of it like a fingerprint: you can verify a match, but you can't reconstruct a person from their fingerprint.

Why this matters for marketers:

Ad platforms like Meta and Google accept hashed identifiers for audience matching. Instead of sending them customer@company.com, you send them a1b2c3d4e5f6... — a fingerprint of the email. The platform hashes their own user data the same way and checks for matches. If you hash before transmission, the raw email can be kept off the wire.

This is the basis of "enhanced conversions" and server-side conversion tracking. You're giving platforms enough to match users without handing over raw PII.

The Caveat: Hashing Isn't Anonymization

Hashing reduces exposure in transit, but it doesn't make data anonymous. The same input always produces the same output. If someone has a list of emails and hashes them, they can build a lookup table (a "rainbow table") to reverse-match your hashes. Hashed identifiers are still personal data in practice because platforms can often re-identify them via matching.

This isn't theoretical. As the FTC noted in 2024: "hashing still doesn't make your data anonymous." Industry experts have been saying this for years (AdExchanger, 2015).

Hashing is a useful tool for data minimization. It's not a magic anonymization wand.

What "Crypto Hashing" Actually Means in Practice

When someone asks if you "cryptographically hash" data, here's what they usually mean — and what a good implementation looks like:

The Standard Process: Normalize, Then Hash

  1. Normalize the input (lowercase, trim whitespace, format phone numbers consistently)

  2. Hash with a standard algorithm (SHA-256 is the ad platform standard)

  3. Send only the hash to the destination

Why normalize first? Because "JohnDoe@Email.com" and "johndoe@email.com" produce completely different hashes. If you don't normalize, matching fails. "Hash + Normalize" is what Meta and Google require — it's not optional.

Algorithm Choices

SHA-256 is the industry standard for ad platform matching. It's what Meta, Google, and most other platforms expect. Unless you have a specific reason to use something else, this is the default.

MD5 is sometimes seen in legacy systems. It's not recommended for security purposes — it has known collision vulnerabilities. It can work as a checksum, but don't rely on it for data protection.

HMAC-SHA256 adds a secret key to the hash. This produces deterministic output (same input + same key = same hash) while protecting against rainbow table attacks from parties who don't have your key. It's useful when you want to match data internally but prevent external correlation; it won't match with external platforms unless they share your key.

Salting: A Trade-off

Adding a random salt to each hash increases privacy — even identical emails produce different hashes. But salting breaks matching with external systems. If you salt an email before sending it to Meta, Meta can't match it to their users because their salt is different (or nonexistent). A common pattern is HMAC internally for storage/linking and plain SHA-256 for external platform matching.

Use salting when you want to prevent cross-platform correlation. Skip salting when you need external systems to match your data.

The Enterprise Trust Checklist

Security reviews aren't just about hashing. Here's what a complete picture looks like:

  • TLS 1.2+ in transit — Data is encrypted between your systems and ours

  • Encryption at rest — Stored data is encrypted, not sitting in plaintext

  • Key management & rotation — Keys live in managed KMS with strict IAM boundaries

  • Access controls & audit logging — Who can see what, and when did they look

  • Configurable data retention — Delete data on your schedule, not ours

  • Option to avoid storing raw PII — Hash at ingest, never store the original

  • Per-destination transformation rules — Hash for Meta, normalize for CRM, redact for analytics

  • Data residency controls — Keep data in-region when required

  • Deletion workflows — Support DSAR and customer deletes end-to-end

The goal isn't to check boxes. It's to ensure the right controls exist at the right points in the data flow.

Concrete Examples

Example A: Platform Match Without Storing Raw Email

A customer fills out a form on your healthcare site. Here's the flow:

  1. Form captures: " Patient@Hospital.com "

  2. Your system normalizes: "patient@hospital.com"

  3. Your system hashes: "a1b2c3d4e5f6..."

  4. Hash is sent to Meta for conversion matching

  5. Optionally: Store only the hash long-term, never the original email

Result: Meta can match conversions without you sending them a readable email. Your database never contains raw patient emails.

Example B: Different Rules for Different Destinations

You capture an event with email and phone. Here's how a proper system handles it:

Raw data captured:

{
  "email": "  Customer@Company.com  ",
  "phone": "+1 (555) 123-4567",
  "utm_source": "google_ads"
}

What gets sent to each destination:

Destination

Email

Phone

UTM Source

Meta

a1b2c3... (hashed)

+15551234567 (normalized)

— (redacted)

CRM

customer@company.com (normalized)

+15551234567 (normalized)

google_ads (as-is)

Analytics

— (redacted)

— (redacted)

google_ads (as-is)

Result: Each system gets exactly what it needs, in the format it expects, with nothing extra.

The Bottom Line

You don't need security theater. You need the right primitives applied in the right places.

Hashing isn't encryption. Encryption isn't anonymization. And checking a "we hash the data" box doesn't mean your tracking pipeline is compliant. What matters is understanding which tool solves which problem, and applying them correctly at each point where data moves.

If you're tracking conversions in regulated industries — healthcare, finance, or anywhere PHI and PII flow through marketing systems — it's worth looking at exactly where plaintext data shows up in your current setup. Common leaks happen in request logs, retry queues (DLQs), and debugging consoles between a form submission and an ad platform.

Want a second set of eyes on your tracking pipeline? We'll review your current setup and point out where plaintext data may be leaking. Get in touch →

Share Article

Book a Demo

Health systems and digital health companies use Ours Privacy to run essential marketing tools like Google Ads and GA4 while maintaining HIPAA compliance.

Related Articles

Newsletter

Stay up to date

Subscribe for privacy news, feature updates, events, etc.

Newsletter

Stay up to date

Subscribe for privacy news, feature updates, events, etc.

Newsletter

Stay up to date

Subscribe for privacy news, feature updates, events, etc.

Start the conversation

Healthcare marketers tell us every day about the challenges of flying blind, navigating compliance, and dealing with ad restrictions. Talk with one of our experts to see if Ours Privacy is the right fit for your organization.

Start the conversation

Healthcare marketers tell us every day about the challenges of flying blind, navigating compliance, and dealing with ad restrictions. Talk with one of our experts to see if Ours Privacy is the right fit for your organization.

Start the conversation

Healthcare marketers tell us every day about the challenges of flying blind, navigating compliance, and dealing with ad restrictions. Talk with one of our experts to see if Ours Privacy is the right fit for your organization.