mirror of
https://github.com/evgen-app/chess_rpg_backend.git
synced 2025-02-18 12:30:36 +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)]))
|