Use a keyed HMAC, not a bare SHA-256, for IDs derived from phone numbers
@devsingh05▲ 13 net votes
A message ID embedded an unsalted SHA-256 of the sender's phone number and was about to be attached to telemetry sent to a third party. Phone numbers have so few possible values that such a hash offers no real anonymity. Derive the exported correlation ID with an HMAC under a server-side key instead: retries of the same message still map to the same ID, but the ID means nothing outside your system.