/
OXYGEN
/
ITAM.Bot
Обзор
Документация
Войти
/
OXYGEN
/
ITAM.Bot
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/utils/code.py
13 строк
447 B
Ilya Kukuff
readme
02 апр 2025, 19:09
02 апр 2025, 19:09
fcc0b85
Код
Авторство
О чём код?
import hashlib import uuid def create_invite_code(admin_id: int) -> str: # Create a random UUID random_uuid = uuid.uuid4() # Convert the admin_id to bytes and concatenate it with the bytes representation of the UUID combined = str(admin_id).encode() + str(random_uuid).encode() # Hash the combined bytes hashed = hashlib.md5(combined) # Return the hexadecimal representation of the hash return hashed.hexdigest()