mirror of https://github.com/nucypher/nucypher.git
Append length in bits to new_X
parent
1acf1c3034
commit
87011f37c5
|
@ -28,7 +28,7 @@ class KMAC_256(object):
|
|||
kmac = hashlib.shake_256()
|
||||
new_X = (self._bytepad(key, self.BLOCK_SIZE_BYTES)
|
||||
+ message
|
||||
+ (self.LENGTH_BYTES).to_bytes(2, byteorder='big'))
|
||||
+ (self.LENGTH_BYTES*8).to_bytes(2, byteorder='big'))
|
||||
|
||||
kmac.update(new_X)
|
||||
return kmac.digest(self.LENGTH_BYTES)
|
||||
|
|
Loading…
Reference in New Issue