2025-12-23 19:17:16 +08:00

8 lines
161 B
Python

import os
def generate_otp():
"""Generates a cryptographically secure random OTP"""
return int.from_bytes(os.urandom(5), byteorder="big") % 900000 + 100000