Created
September 9, 2021 17:02
-
-
Save nickfogle/82dba67f7e1f730ca2f147a263e35508 to your computer and use it in GitHub Desktop.
Sample HMAC Hash Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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