(length: int = 24)
| 175 | |
| 176 | |
| 177 | def generate_password(length: int = 24) -> str: |
| 178 | alphabet = string.ascii_letters + string.digits |
| 179 | return "".join(secrets.choice(alphabet) for _ in range(length)) |
| 180 | |
| 181 | |
| 182 | def generate_hash_key(length: int = 64) -> str: |