mirror of
https://gitea.tendokyu.moe/beerpsi/x.git
synced 2025-02-20 04:20:59 +01:00
chore: use inline dependency metadata
This commit is contained in:
parent
ecaec6d942
commit
3dff5f3c58
@ -1,3 +1,10 @@
|
||||
# /// script
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = [
|
||||
# "construct",
|
||||
# "pycryptodome",
|
||||
# ]
|
||||
# ///
|
||||
# pyright: reportMissingTypeStubs=false, reportOperatorIssue=false, reportUnknownArgumentType=false, reportUnknownMemberType=false
|
||||
from math import ceil
|
||||
import os
|
||||
@ -221,7 +228,7 @@ with open(INPUT_FILE, "rb") as fin, open(OUTPUT_FILE, "w+b") as fout:
|
||||
null_byte_count = BOOTID["block_size"] - (total_written % BOOTID["block_size"])
|
||||
|
||||
while null_byte_count > 0:
|
||||
page_iv = get_page_iv(iv, total_written)
|
||||
page_iv = get_page_iv(ENCRYPTION_IV, total_written)
|
||||
cipher = AES.new(ENCRYPTION_KEY, AES.MODE_CBC, page_iv)
|
||||
encrypted = cipher.encrypt(b"\x00" * 4096)
|
||||
total_written += fout.write(encrypted)
|
||||
|
Loading…
x
Reference in New Issue
Block a user