# Functions
ComparePasswords compares a hashed password with plain string password and returns a boolean representing whether the passwords match or not.
Decrypt decrypts a base64 string using the secret key and returns the plaintext string.
Encrypt encrypts a string to base64 crypto using AES256 encryption.
GetUserIDFromToken first decrypts the provided token with the secret key and then looks up the user id of the key in redis and returns it.
HashPassword hashed the given password using bcrypt and returns the string form of the hashed password.
LoadEnv Loads the environment variables defined in the .env file according to the environment running.
SendEmail creates a unique token for a given userID, stores that token in redis and sends an email to the email address of that user to ask them to visit that link and do what is required.
# Constants
ConfirmEmailPrefix is the string that is prefixed before the actual confirm email token while storing in redis so that it will be easily identifiable and it will not collide with any other key.
ExpirationDuration is the duration after which the email link expires.
ForgotPasswordPrefix is the string that is prefixed before the actual forgot password token while storing in redis so that it will be easily identifiable and it will not collide with any other key.