add delimiters to per-user torrent filenames

This commit is contained in:
Jimmy Zelinskie 2016-01-22 15:53:21 -05:00
parent e54b86c6eb
commit 2650772db3

View file

@ -58,7 +58,7 @@ def public_torrent_filename(blob_uuid):
return hashlib.sha256(blob_uuid).hexdigest()
def per_user_torrent_filename(user_uuid, blob_uuid):
return hashlib.sha256(blob_uuid + user_uuid + FILENAME_PEPPER).hexdigest()
return hashlib.sha256(FILENAME_PEPPER + "||" + blob_uuid + "||" + user_uuid).hexdigest()
class PieceHasher(object):