Created
November 16, 2023 08:16
-
-
Save KabakiAntony/24b2a13b8f4ec52fd9423043b45e1e29 to your computer and use it in GitHub Desktop.
password generation 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
def generate_password(self): | |
self.timestamp = self.now.strftime("%Y%m%d%H%M%S") | |
password_str = self.shortcode + self.passkey + self.timestamp | |
password_bytes = password_str.encode() | |
return base64.b64encode(password_bytes).decode("utf-8") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment