Last active
May 16, 2017 23:50
-
-
Save konsorten-michael/accc406e042e284e2a6ff915a865b100 to your computer and use it in GitHub Desktop.
Regular expressions for api keys and more of various services and apis
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
/* Expressions used multiple times | |
************************************/ | |
/* MD5 hash */ | |
const REGEX_MD5_HASH = /^[a-f0-9]{32}$/i; | |
/* SendGrid (https://sendgrid.com/) | |
************************************/ | |
/* API key */ | |
const REGEX_SENDGRID_API_KEY = /^SG.[A-z0-9]{22}.[A-z0-9\-_]{43}/; | |
/* ID of a recipient at the contacts database. */ | |
const REGEX_SENDGRID_RECIPIENT_ID = REGEX_MD5_HASH; /* The ID is always the md5 hash of the contacts e-mail. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment