MCPcopy Create free account
hub / github.com/Syncplay/syncplay / _computeRoomHash

Method _computeRoomHash

syncplay/utils.py:534–540  ·  view source on GitHub ↗
(roomName, password, salt)

Source from the content-addressed store, hash-verified

532
533 @staticmethod
534 def _computeRoomHash(roomName, password, salt):
535 roomName = roomName.encode('utf8')
536 salt = salt.encode('utf8')
537 password = password.encode('utf8')
538 salt = hashlib.sha256(salt).hexdigest().encode('utf8')
539 provisionalHash = hashlib.sha256(roomName + salt).hexdigest().encode('utf8')
540 return hashlib.sha1(provisionalHash + salt + password).hexdigest()[:12].upper()
541
542
543class RandomStringGenerator(object):

Callers 2

checkMethod · 0.80
getControlledRoomNameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected