mirror of
https://github.com/evgen-app/chess_rpg_backend.git
synced 2024-11-22 17:47:11 +03:00
15 lines
286 B
Python
15 lines
286 B
Python
import string
|
|
import secrets
|
|
|
|
from random import randint
|
|
|
|
|
|
def generate_charset(length: int):
|
|
return "".join(
|
|
secrets.choice(string.digits + string.ascii_letters) for _ in range(length)
|
|
)
|
|
|
|
|
|
def gen_ton():
|
|
return int("".join([str(randint(0, 9)) for _ in range(48)]))
|