Template
mirror of
https://github.com/djimboy/djimbo_template_aio3.git
synced 2026-08-28 16:07:43 +00:00
Update
This commit is contained in:
@@ -198,8 +198,9 @@ def convert_date(from_time, full=True, second=True) -> Union[str, int]:
|
|||||||
def gen_id(len_id: int = 16) -> int:
|
def gen_id(len_id: int = 16) -> int:
|
||||||
mac_address = uuid.getnode()
|
mac_address = uuid.getnode()
|
||||||
time_unix = int(str(time.time_ns())[:len_id])
|
time_unix = int(str(time.time_ns())[:len_id])
|
||||||
|
random_int = int(''.join(random.choices('0123456789', k=len_id)))
|
||||||
|
|
||||||
return mac_address + time_unix
|
return mac_address + time_unix + random_int
|
||||||
|
|
||||||
|
|
||||||
# Генерация пароля | default, number, letter, onechar
|
# Генерация пароля | default, number, letter, onechar
|
||||||
|
|||||||
Reference in New Issue
Block a user