remember to terminate your c-strings kids

This commit is contained in:
beerpsi 2024-07-18 03:52:44 +07:00
parent 5c40c357c6
commit f8a759c3a4

View File

@ -148,7 +148,7 @@ iv = secrets.token_bytes(16)
encrypted_keypair = PKCS1_OAEP.new(HEADER_META_PUBKEY).encrypt(key + iv)
header_meta = struct.pack("<Q", int(time.time())) + os.path.abspath(INPUT_FILE).encode(
"utf-8"
)
) + b"\x00"
header_meta += secrets.token_bytes(
BOOTID["block_size"] - len(header_meta) - len(encrypted_keypair)
)