Как создать идентификатор необходимой мне длины?
Например, моя строка:
Код: Выделить всё
'827263877-13969916-1800-1-0.0'
Код: Выделить всё
def make_unique_id(*args):
data = '-'.join(str(args))
id = hashlib.md5(data.encode('ascii')).hexdigest()
id_int = int(id, 32)
return id_int
Код: Выделить всё
test_id_digest: '051fbd93807b21c48f7a579dbd48e13c'
test_id_final_int: 6810946243257077380510446529265852732
Подробнее здесь: https://stackoverflow.com/questions/785 ... th-hashlib