Skip to content

Instantly share code, notes, and snippets.

@nickfogle
Created September 9, 2021 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickfogle/82dba67f7e1f730ca2f147a263e35508 to your computer and use it in GitHub Desktop.
Save nickfogle/82dba67f7e1f730ca2f147a263e35508 to your computer and use it in GitHub Desktop.
Sample HMAC Hash Function
import hmac
import hashlib
email_hash = hmac.new(
API_KEY, # Your API Key (keep safe)
CUSTOMER_ID, # Stripe Customer ID
digestmod=hashlib.sha256
).hexdigest() # Send to front-end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment