Implement retry and fail cases in authenticator

This commit is contained in:
Lonami Exo
2018-06-07 17:20:45 +02:00
parent df895a94ab
commit f72ddbdd5a
3 changed files with 29 additions and 30 deletions

View File

@@ -37,4 +37,4 @@ class AuthKey:
data = new_nonce + struct.pack('<BQ', number, self.aux_hash)
# Calculates the message key from the given data
return sha1(data).digest()[4:20]
return int.from_bytes(sha1(data).digest()[4:20], 'little', signed=True)