This commit is contained in:
yumoqing 2025-06-17 18:12:46 +08:00
parent e0916e89b9
commit 32ab92b571

View File

@ -111,7 +111,6 @@ def data_jj_encode(data, pubkey_b64str):
"""
pubkey = get_rsa_pubkey_from_pemstr(pubkey_b64str)
aes_key = generate_key()
print(f'{aes_key=}')
aes_key_cyber = pubkey_encode(pubkey, aes_key)
jd = json.dumps(data)
@ -125,7 +124,6 @@ def data_jj_encode(data, pubkey_b64str):
def data_jj_decode(cdata, prikey_b64str):
prikey = get_rsa_prikey_from_pemstr(prikey_str)
aes_key = prikey_decode(prikey, cdata['AESKey'])
print(f'{aes_key=}')
js_cyber = base64.b64decode(cdata['data'])
js = aes_decrypt_ecb(aes_key, js_cyber)
d = json.loads(js)