fnp
/
turniej.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
02865052e61bcd8e0ab3fc7524327fda1b20fa14
[turniej.git]
/
apps
/
poetry
/
utils.py
1
import time
2
3
from base64 import urlsafe_b64encode
4
from hashlib import sha1
5
6
7
def get_hash(seed):
8
sha_digest = sha1(('%d%s' % (time.time(), str(seed))
9
).encode('utf-8', 'replace')).digest()
10
return urlsafe_b64encode(sha_digest).replace(b'=', b'').replace(b'_', b'-').lower()