Allow IFAC bitmask generation for large packet sizes

This commit is contained in:
Mark Qvist 2025-01-11 17:26:51 +01:00
parent 5d677d2fb7
commit 45494f21aa

View File

@ -48,7 +48,7 @@ def hkdf(length=None, derive_from=None, salt=None, context=None):
derived = b"" derived = b""
for i in range(ceil(length / hash_len)): for i in range(ceil(length / hash_len)):
block = hmac_sha256(pseudorandom_key, block + context + bytes([i + 1])) block = hmac_sha256(pseudorandom_key, block + context + bytes([(i + 1)%(0xFF+1)]))
derived += block derived += block
return derived[:length] return derived[:length]