theoEnc/PACKAGE/theoEnc/random.py
2023-10-14 15:56:37 +02:00

12 lines
231 B
Python
Executable File

#!/usr/bin/python3
import secrets
import string
def random_string(length: int):
symbols = string.punctuation + string.ascii_letters + string.digits
ret = ""
for _ in range(length):
ret += secrets.choice(symbols)
return ret