fnp
/
turniej.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
29473dac330898ffef0b02b65a00d8a7a3a78eba
[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('%s%s' %
9
(time.time(), unicode(seed).encode('utf-8', 'replace'))).digest()
10
return urlsafe_b64encode(sha_digest).replace('=', '').replace('_', '-').lower()