Created
May 19, 2023 16:05
-
-
Save LesterLian/3191b79aece8a8e5d235825d23ab18fb to your computer and use it in GitHub Desktop.
UUID5 with salt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from uuid import UUID, uuid5 | |
from hashlib import md5 | |
salt = 'SALT' | |
uid = input('Enter uid: ') | |
salt_hash = md5(salt.encode('utf-8')).digest() | |
namespace = UUID(bytes=salt_hash) | |
print(uuid5(namespace, uid)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment