gitscope
← marzneshin / v0.5.1 / app/utils/keygen.py
https://dev.kronoz.win/r/marzneshin.git
app/utils/keygen.py · Python
Blame Raw
 1import xxhash
 2import uuid
 3
 4
 5def gen_uuid(key: str) -> str:
 6    return str(uuid.UUID(bytes=xxhash.xxh128(key.encode()).digest()))
 7
 8
 9def gen_password(key: str) -> str:
10    return xxhash.xxh128(key.encode()).hexdigest()