Use autogen code on the authenticator instead hardcoding requests

This commit is contained in:
Lonami Exo
2017-09-28 11:36:51 +02:00
parent 4bedbfe945
commit fe30f63d5d
4 changed files with 125 additions and 156 deletions

View File

@@ -18,5 +18,6 @@ class AuthKey:
"""Calculates the new nonce hash based on
the current class fields' values
"""
new_nonce = new_nonce.to_bytes(32, 'little', signed=True)
data = new_nonce + struct.pack('<BQ', number, self.aux_hash)
return utils.calc_msg_key(data)