Skip to content

Add Hem and HashedPhoneNumber identifiers - #47

Open
mosherBT wants to merge 2 commits into
masterfrom
feature/hem-helper
Open

Add Hem and HashedPhoneNumber identifiers#47
mosherBT wants to merge 2 commits into
masterfrom
feature/hem-helper

Conversation

@mosherBT

@mosherBT mosherBT commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Add .hem helper, so a caller holding a SHA256 of an Email can pass it directly instead of building a prefixed Raw string.

The value is normalized but never hashed again, and is dropped unless it is a SHA-256 digest, which keeps a plaintext Email off the wire. Raw is left untouched.

Why

HEM support + Hashed phone number support

What Changed

How to Test

  • ./gradlew test passes
  • Verified in DemoAppJava / DemoAppKotlin
  • README updated (if public API changed)

Notes

  • Breaking change
  • Requires release

Mirrors the .hem helper added to the iOS SDK, so a caller holding a SHA256
of an Email can pass it directly instead of building a prefixed Raw string.

The value is normalized but never hashed again, and is dropped unless it is
a SHA-256 digest, which keeps a plaintext Email off the wire. Raw is left
untouched.
@mosherBT
mosherBT requested review from a team as code owners August 14, 2026 17:44
@mosherBT mosherBT self-assigned this Aug 14, 2026

@zuolongwu-optable zuolongwu-optable left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a single nitpick

Comment thread README.md
val ids = listOf(
OptableIdentifier.Email("john.doe+test@example.com"),
OptableIdentifier.PhoneNumber("+1(555)1234567"),
// Already hashed? Pass it directly, it will not be hashed again:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: what about HashedPhoneNumbers, shouldn't it be here too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants