mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-11 06:07:53 +00:00
Fixes issue #205 with managed room names
This commit is contained in:
parent
c3d2092f3d
commit
3042efddbc
@ -476,8 +476,10 @@ class RoomPasswordProvider(object):
|
||||
@staticmethod
|
||||
def _computeRoomHash(roomName, password, salt):
|
||||
roomName = roomName.encode('utf8')
|
||||
salt = hashlib.sha256(salt).hexdigest()
|
||||
provisionalHash = hashlib.sha256(roomName + salt).hexdigest()
|
||||
salt = salt.encode('utf8')
|
||||
password = password.encode('utf8')
|
||||
salt = hashlib.sha256(salt).hexdigest().encode('utf8')
|
||||
provisionalHash = hashlib.sha256(roomName + salt).hexdigest().encode('utf8')
|
||||
return hashlib.sha1(provisionalHash + salt + password).hexdigest()[:12].upper()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user