Skip to content

Instantly share code, notes, and snippets.

@KabakiAntony
Created November 16, 2023 08:16
Show Gist options
  • Save KabakiAntony/24b2a13b8f4ec52fd9423043b45e1e29 to your computer and use it in GitHub Desktop.
Save KabakiAntony/24b2a13b8f4ec52fd9423043b45e1e29 to your computer and use it in GitHub Desktop.
password generation function
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