Refactors Project for More Declarative Package Name

This commit is contained in:
2023-08-18 03:25:30 -03:00
parent 2bd7ae10b9
commit f3e77889a2
29 changed files with 108 additions and 80 deletions

View File

@@ -0,0 +1,9 @@
import base64
from hashlib import md5
def file_name_hash(username: str, file_postfix: str) -> str:
hashed_username = md5(username.encode("utf-8")).digest()
hashed_username = base64.b64encode(hashed_username).decode()
return f"{hashed_username}_{file_postfix}"