From 05d7c1305ba756746cc42acfd54910847e03bd91 Mon Sep 17 00:00:00 2001 From: mokurin000 <1348292515a@gmail.com> Date: Wed, 30 Jul 2025 12:54:35 +0800 Subject: [PATCH] chore: 32 zero prefix --- API_AuthLiteDelivery.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/API_AuthLiteDelivery.py b/API_AuthLiteDelivery.py index d25b9ec..3d8a7e3 100644 --- a/API_AuthLiteDelivery.py +++ b/API_AuthLiteDelivery.py @@ -15,9 +15,8 @@ LITE_AUTH_IV = bytes.fromhex("00000000000000000000000000000000") def auth_lite_encrypt(plaintext: str) -> bytes: # 构造数据:16字节头 + 16字节0前缀 + 明文 - header = bytes(16) - content = bytes(16) + plaintext.encode("utf-8") - data = header + content + content = bytes(32) + plaintext.encode("utf-8") + data = content # 填充并加密 padded_data = pad(data, AES.block_size) cipher = AES.new(LITE_AUTH_KEY, AES.MODE_CBC, LITE_AUTH_IV)