python
复制代码
import base64
from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
from Crypto.PublicKey import RSA
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from cryptography.hazmat.primitives import padding
from cryptography.hazmat.primitives.padding import PKCS7
# key = 'Af7ugPbk3UvU2WU2Y37xww27nyWak2Dj'
# data = 'UoFUtoiCnMzs+HkE8DmhOzaeGjZzY0xyr/j1halLTrM='
# # data = 'UoFUtoiCnMzs+HkE8DmhOzaeGjZzY0xyr/j1halLTrM='
# # data = '1693039605-1693039605'
# data = '1693090946-1693090946'
import base64
import json
import urllib.parse
from urllib.parse import unquote
from Crypto.Util.Padding import pad
def encrpt(password, public_key):
# public_key = '-----BEGIN PUBLIC KEY-----\n' + public_key + '\n-----END PUBLIC KEY-----'
rsakey = RSA.importKey(public_key)
cipher = Cipher_pksc1_v1_5.new(rsakey)
cipher_text = base64.b64encode(cipher.encrypt(password.encode()))
return cipher_text.decode()
def decrypt(password, public_key):
# public_key = '-----BEGIN PUBLIC KEY-----\n' + public_key + '\n-----END PUBLIC KEY-----'
rsakey = RSA.importKey(public_key)
cipher = Cipher_pksc1_v1_5.new(rsakey)
cipher_text = cipher.decrypt(base64.b64decode(password), 'ERROR').decode('utf-8')
return cipher_text
# def pad(data):
# text = data + chr(16 - len(data) % 16) * (16 - len(data) % 16)
# return text
def unpad(s):
last_num = s[-1]
text = s[:-last_num]
return text
def aes_ECB_Decrypt(data, key, iv): # ECB模式的解密函数,data为密文,key为16字节密钥
key = key.encode('utf-8')
aes = AES.new(key=key, iv=iv, mode=AES.MODE_CBC) # 创建解密对象
# decrypt AES解密 B64decode为base64 转码
result = aes.decrypt(base64.b64decode(data))
result = unpad(result) # 除去补16字节的多余字符
xx = str(result, 'utf-8')
# xx = urllib.parse.quote(xx)
return xx # 以字符串的形式返回
def aes_ECB_Encrypt(data, key, iv): # ECB模式的加密函数,data为明文,key为16字节密钥
key = key.encode('utf-8')
data = data.encode('utf-8')
data = pad(data, 16) # 补位
aes = AES.new(key=key, iv=iv, mode=AES.MODE_CBC) # 创建加密对象
# encrypt AES加密 B64encode为base64转二进制编码
result = base64.b64encode(aes.encrypt(data))
xx = str(result, 'utf-8')
# xx = urllib.parse.quote(xx)
return xx # 以字符串的形式返回
# key需要修改成自己的
key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDlOJu6TyygqxfWT7eLtGDwajtNFOb9I5XRb6khyfD1Yt3YiCgQWMNW649887VGJiGr/L5i2osbl8C9+WJTeucF+S76xFxdU6jE0NQ+Z+zEdhUTooNRaY5nZiu5PgDB0ED/ZKBUSLKL7eibMxZtMlUDHjm4gwQco1KRMDSmXSMkDwIDAQAB'
# password = encrpt('hello', key)
# print(password)
privateKey = 'FbWSA5ykkZHgLVULzad+i+6gqUnikU3eiPcDT1tMKNfy9/sciwDQAx8mL0AUmBTdZbfjfnGZ9UHRKteQrkK6HuC/Y9JP2FFs4VzZaz2BV06S3KDlmzZUltJ63flkdDhvJgDs3uAoZhW0YeNfBZzeqn6E9/OJvuSIUOFSQICHZFrnenVAI4At0x9ZWkSfHmV/1LDb1W+wyOkjZ3KiNb+6PEB6RPxi/vlACR7SjB7dmgcA9+5enJYQS2x00fohxPtmR3wuh7c/XcS2S1OevzRPAgZjE6FyEiCkHukc2zYkJ+qxexHJKzvrAjsihIln1eAfxSkMCmYZbEwVmhzCDuX3YQ=='
private_key = "-----BEGIN PRIVATE KEY-----\nMIIEpAIBAAKCAQEAobg5iEask2geDtxuvqFnan3O4PIG1mFRP5U/rNFa1B9DQ8aHXLgG4LDllTRxRYNIUDXfKCUxaHcfZDSBIfIHzEvp7oE+5O+ynbczH2SjXJfN8VGA5NZPGbvKQjwdkRRgoQdcEVZUYe7FWxeFSIRNU2N20dfVjpv7rtlMTKTBBaaFpnOb6oZEiTwK2mAuHTD1GfQ2RAbGZs59gQBG2MDycSf6i27QqbW0I4AOwm7mIhWe42Y+//aQRzF3qc6AMNATVyByWEIK8jULyRuR0M5B+f2lU1vWBf21KnN4mlMdDSHRliPfWRrXrvKrAc2FymE4/DiZ01VB3uy3M4TV/rgdywIDAQABAoIBABi6Bs3v5G4rcsEZ8jLikeHl945MY0A/JAGhS9mcLxOU7h98SPEj0CVl1syf9pvGzXU6L3M/cJUE9b9ICeCLVabmio+loly1y60yuDXaGOJM8beumxMiM3j/ThcfgvPOVlH4wpqCBSfuLq3VZFMoq3wPDrlaE3SZI/vhjLmBTWQUCeuUgPDHsyztsVp9hiJfdlXlLAt7a5Aw63A5mYvyqIi0DcdVhVti6kZAdhkvbA2RSQyTajkgxoXcpe8PXDMbgT9WV2gyTJz832/nDw3HuYkwMS89CUoUa2P5HuBPErxca/0Ydv7V7xRfyNF+naUEIpTYVsOcbhyQFJSsf1ylwpkCgYEA41Ziuelp9rFnHz//ZSHeEm8SL8KTmRbnFTNVWr45ZsSfHzIVOUdrnKnlz+yu5vcMwytSBFwuBlgSBHWAFH+42Su0J4eI06/77pwriGgESjZzkvtsT3LI7YWvctNMo4XqERa3ouTFIjkVFfsXHEnW7Zx9+amQvemt7DuZnpRfLtkCgYEAthvwHhKEhtluizUIpICacGJDenZgO3ZxZk6WHpwtrqo7qkZfif/VrgkixpqlIJjx0vj4jafbtVyNPwSZ9VfcRFq44LcOPkOg6ngf2ao42WcW5LebGlOmr0lk82+gzoojkrqN0PE9LCjbD47r4TcFD6GeTaVFzmquzYEBYMyC00MCgYAbyfR5e0G7qQXM+Rqz9wbZRAB6HBPEs9r9aW/2jqgfmstEme+kN8m8tbvkxa6/htVligcVh1sM5XkWWHKWjuI+kawM5PFhxvJJwYdEvko/9BX+koMz1vkep6fBpniIyJbLDfbWj5ZVT5r3O+EgURpXozh26zZJMKZU6RgnHUXhSQKBgQCaHFh+yoL2r2i6S74toFuSAcZDC4xypdBfmN+3tcl/B7cIaReO7D9DUZ3pXpOhW21Cccm97zCicVli3B0CIEFaY0ATgzZ9gLPb2J5zkHcdm/0mvy52ABaOPlk9HdmDECn8kP1UteJjzYtcxkFdzTbuPIKACP5jKasWZDbrWQbZiwKBgQCIgGepO63kS+wSV/iswXTnWx8ZIYNQ+JrsDyQyJTLhfTGYhvwe0+DCbnt96KL0TZ6HVgT5RYhlzcD4hZJQNqfdjXHP9Bredt7AehiiMkU3B+O81JBM0mroR0vhtyqId37PhFHiRtErxgbfOEKKPAVbWXaAPrmc4DkDqNFdedZIzw==\n-----END PRIVATE KEY-----"
# private_key_pem = "MIIEpAIBAAKCAQEAobg5iEask2geDtxuvqFnan3O4PIG1mFRP5U/rNFa1B9DQ8aHXLgG4LDllTRxRYNIUDXfKCUxaHcfZDSBIfIHzEvp7oE+5O+ynbczH2SjXJfN8VGA5NZPGbvKQjwdkRRgoQdcEVZUYe7FWxeFSIRNU2N20dfVjpv7rtlMTKTBBaaFpnOb6oZEiTwK2mAuHTD1GfQ2RAbGZs59gQBG2MDycSf6i27QqbW0I4AOwm7mIhWe42Y+//aQRzF3qc6AMNATVyByWEIK8jULyRuR0M5B+f2lU1vWBf21KnN4mlMdDSHRliPfWRrXrvKrAc2FymE4/DiZ01VB3uy3M4TV/rgdywIDAQABAoIBABi6Bs3v5G4rcsEZ8jLikeHl945MY0A/JAGhS9mcLxOU7h98SPEj0CVl1syf9pvGzXU6L3M/cJUE9b9ICeCLVabmio+loly1y60yuDXaGOJM8beumxMiM3j/ThcfgvPOVlH4wpqCBSfuLq3VZFMoq3wPDrlaE3SZI/vhjLmBTWQUCeuUgPDHsyztsVp9hiJfdlXlLAt7a5Aw63A5mYvyqIi0DcdVhVti6kZAdhkvbA2RSQyTajkgxoXcpe8PXDMbgT9WV2gyTJz832/nDw3HuYkwMS89CUoUa2P5HuBPErxca/0Ydv7V7xRfyNF+naUEIpTYVsOcbhyQFJSsf1ylwpkCgYEA41Ziuelp9rFnHz//ZSHeEm8SL8KTmRbnFTNVWr45ZsSfHzIVOUdrnKnlz+yu5vcMwytSBFwuBlgSBHWAFH+42Su0J4eI06/77pwriGgESjZzkvtsT3LI7YWvctNMo4XqERa3ouTFIjkVFfsXHEnW7Zx9+amQvemt7DuZnpRfLtkCgYEAthvwHhKEhtluizUIpICacGJDenZgO3ZxZk6WHpwtrqo7qkZfif/VrgkixpqlIJjx0vj4jafbtVyNPwSZ9VfcRFq44LcOPkOg6ngf2ao42WcW5LebGlOmr0lk82+gzoojkrqN0PE9LCjbD47r4TcFD6GeTaVFzmquzYEBYMyC00MCgYAbyfR5e0G7qQXM+Rqz9wbZRAB6HBPEs9r9aW/2jqgfmstEme+kN8m8tbvkxa6/htVligcVh1sM5XkWWHKWjuI+kawM5PFhxvJJwYdEvko/9BX+koMz1vkep6fBpniIyJbLDfbWj5ZVT5r3O+EgURpXozh26zZJMKZU6RgnHUXhSQKBgQCaHFh+yoL2r2i6S74toFuSAcZDC4xypdBfmN+3tcl/B7cIaReO7D9DUZ3pXpOhW21Cccm97zCicVli3B0CIEFaY0ATgzZ9gLPb2J5zkHcdm/0mvy52ABaOPlk9HdmDECn8kP1UteJjzYtcxkFdzTbuPIKACP5jKasWZDbrWQbZiwKBgQCIgGepO63kS+wSV/iswXTnWx8ZIYNQ+JrsDyQyJTLhfTGYhvwe0+DCbnt96KL0TZ6HVgT5RYhlzcD4hZJQNqfdjXHP9Bredt7AehiiMkU3B+O81JBM0mroR0vhtyqId37PhFHiRtErxgbfOEKKPAVbWXaAPrmc4DkDqNFdedZIzw=="
# 使用示例
# private_key_pem, public_key_pem = generate_keys()
# message = b"Hello, World!"
# encrypted_message = encrypt_message(public_key_pem, message)
decrypted_message = decrypt(privateKey, private_key)
print("Original Message:", privateKey)
# print("Encrypted Message:", encrypted_message)
print("Decrypted Message:", decrypted_message)
def string_to_hex_to_base64(s):
byte_arr = bytes.fromhex(s)
xx = base64.b64encode(byte_arr).decode('utf-8')
return xx
def base64_to_hex_to_string(s):
bs = base64.b64decode(s)
xx = bytes.hex(bs)
return xx
def utf8_parse(input_str):
return bytes(input_str, 'utf-8')
data = 'c934ee029ce9258ca9171487b24fdb0d6679b0b4a64722a649afdc34832bf19e0c74dee6331727043dcd42c8ec2be474ffd1fd078456dc4b9e3032462ed318c25472c88798b249c8d79998b5ecd03b3e095a2269115a4a6d4ea4829e4c9fddd0ea91087304db1c43dc7fad45c3011b3f46837d88427e5dc03454d847e9033809380f7635cfcc996cb406485fdcb2f2992c14ff02ddc48c36416965beeb4c2cef75be470c07e09598ac4c9c1b65518c329f4dfe8b794919574b0dd91fea7c01ebdc4080435a752b9e66b2f7c8c375c14e24c85f568098aeb09bcdcb81d9044012cfb0e6d2ec6c8ee8af6424223a835a59b3de0786e795ea64bdfb9279980a25487eda6558b0b505d949adb89955f972fed2cb32e51d2a5d882159106ae1b93e3b67fdfa6a9e010c0cabbd1e55a9a9d947d6a2d66023c9eeda5a19fe5ff128ec532d031b1013385f7f3b3198e074c6a2aa105f06428e2b92587c10c1d7aef48ebded86025deab10468640036c8a4d879f28737ce84a644a83290f2a1e2d3c7886d26a2980a55739253c14f31e436dad64f5dc61c6d4f6a831b04a7ab1e5ac6e5e09e8a4b15c0905d8bca30b2e9054470c8a4be360163c63f45070bebccc74eda6103f03e1c48ef9d3ac9916a650d712ff6e5c5a4bc4b666a2434eae75d6823622d4adaaef24dd27f7b0d18135162509b7ddc2dadd4f4a1f56eedf585aaf4e3f1647c4bb1afe32881bc1bbc97b5e0f1541a8bc1efd62eb1ea9f574d941e379367532700c0dd1d581df1033961cc35d7d97459eed651f10f64c8f2dab203e23997b865bda50f37735e106667390e8f61b21ac8aa6b4cbd6b42ca64d7b3dbedbfe39a4429a0a4f345f92d2300f24f2e97f7ee0e619172251498cc1e52137cb8b9515bedf3921cae669803a80faa9d3f0313e971ab01b69d5f0d9add125890b8d35e15691ec05d0fdfe738ad3f80836e0c8f6fd0eb1389650a581fa45084c9c624dd22b5d531b9014ddc52164aa2860b8295e7cf11fd06288a13fe40b0cce8acd2207408d61ce52a2799a20a8f941fc374668a1b4b12efaa2cee456a2490fd566112af7e1b4c28c119e8a4a50ee460145db3414b87416fe92944b657159e0834a46769e9d72a71532bee3b4d8ba8f3bd90f7b1d6ef29a2de384713644c47ab1325ec64a37e6780163dc77cd230a59edde5ab5ee015be142e74b71c971e1049842304a6443e54f3aa892b2d3bc844098203ae1f3f553c03b9ebe25b491a988f8fa367e7810552f4d8b926939aee0c10ce7e4d71d0b6cdde3972263155cdd7682999c138442b7876345d3d3f46e01da365bf3f7270f303e661cb34cc340304ef6bc16b8071aec3441854739d44eacfb2dbddd77e0e2f6a20b3ddfc58d56ee747fd50ab2ae723a4c3d09d5ccce223a431133e066c90c23d3c3e785be114a6dac9183f628b4066a1a83be0504c5851c713c4a5aa2a9e9d61e3067562e96ac77fab852f72416132d66d6d6286b508f8531f2f1482d857a7bb2f6bd73b3007c94ce82df814e30cc4e634b3200986e6f2acf3ffa238500114d27fc806af1ec6db83ffb2f89b9179d8f602ff2a9eea2cffe6e3c742b5640bfc4f348f1960371c03333cd2c3f1a381765a202775c785248deed6e6b5a2b26f4edf3480dea3696a560217ac97c3daa513af741dffce6a016aaf7bc05eb43dffc1ccc9eee10f019a7063edce2b9f8739e90abc8020ae119ec9b877ded14b7856368d47fb040263946ea161d965f0ff7583ec5b73281d18b27b6ffb86b3ac675d4dcb82bd5b6dfadf31cf296801c51fe8d7d4cb46d9453c0e96e4ef31ae48ae095bc9b89f0e9d8a90d4acbf8a10105fc86d613a32c470bce4cab910eeab659753633737e5e3638b028d7bbb4c29c4c68211e03797bb124ab58cae0ffaade44541fa5e58a5cfd89bc80f8b955ed1912241c51d6d6533c2534c9190688b4ab76d4c2f7b3a875f0d47053b09629b1630e41b9152843fccd667e904c6f9cebb1484819b125a4c324ee590df171257c229f224e9e1ba34f18e47e25227e0948a56bd708dc28a408a411139f7ac74786cab2add761082dd1367e111942a8a123f6c9d635fedcb4945fec3c38f37f55417ff450c95fdacd8196eeb2480f880a8ed538936bc6db00c85c303a4a4cd3b26fddea2469175207089358b52cfb5e11bf8e7a389a568a2c30669d501cb1f32f62101d7a3f50296e128639a89e61ed1e78f6fde35605eb0297c339ada58b86e9078a2a67b6ade256e843ac3133866141229ca969a8381a42c9b82b5b8b20cb1cb883f9b16b88f37e50f56365d3f0aa02e45f0cf393aca4c12f26e8cacf8b495b443f9c52573a86c6ac9ec0a6f3c8f6cf8b3f14b106121630957f245828f4c5d67e204419d5bf6cedf42232491ca8e14f4b4df456eb699636d01db4ec24f9993032bb9a276829623a541b49918df80ffb044b6f1cca2dda19b1538ad50215c36e86ebb48976734f907f7b59bf6d964564d1f3dcaf095b0e67b7189a0dd034aa4a319e12c53cc34b2299beaba17123e78c47104be70435a3aadf9fe9e014eee4faa9e9145377b9cba1684e68359ae8dd2efe80823e5afc021dc257fdd90b1219309ec900e7c170fa5cd89ce8b92b401b563abe5f1c4a2d0cd2507109f0dac7fc8b476b3fb74baea8ba2d61496fde0d7346a135d1264d7df1d2b665af146110fe635301deb884b1b500cb0b6825216e4ce550d97eb94f5c080e1ee62f5f116f17d511ebdc044c9d662305ecdf72f6ab0d661d279e36628324c5d3eec535a305d68d67a56b8dab12c7108fbba6dbe6547e3737ffff6008ed961d2f311ac072a9c466d1b99dde46a354751a7da6f4b72fca938d0e0b4eeb8e2778692b4ab41b669bdf6f34c6c9ec0874e39bfdf9149388154c2a74dd8609613ef7a09fff990bee2d17b59f2917361834189baf5d4b321205d4f315da3159d20a7fb80ef6a3036fd9e87b0a2a3d7986ff302d4c5a6c02532d1aaa6564d81b96758629730897be90f161ef08f2552d1c85822e9ce4374dce63bd2ba139a7655985ed088676538548b64d92fb1c8437db16fe7bb81e9ce4fd36a0318ec1a1a3d5f261964fc6d2b26813aa7795d13a44613fef3e6a33fce58c7b2e05ff53c235a23f95c195c0db21acd87d81ef8d826a005050dfa495f36702d0f7bb2ac1f38227962986cdbdc8c96194516dcc1f8460cce2fa841be7461c8e7fd12a034b97071e37efcc7a7b25c1ac33da49568ba5eb3546c1be008b6e81644e8108ef719c0f6d582ae63b3d716e621e0dca71cfe50ad5c070807feb413f0bc8e43157cc5158ae7d7c9d8a7cd54e2246e5d002b2d1d3034936c2bf7b1dad3f7cd6ffe2fcfa53c4b00f7cff253896acc0ed444f6c6f70d3017641f52807ae08775ff32e42f2177dcff3dcef97f7e3b66720c03c91d681eebd7e8674b087dfffaf8a7d87a5f3382a9419849df04047c440c377e5e5ac30834f0c6b4cfbb4cb84e45d2b2c7eccecaa5f0929061ab5de5092de1a43cdb0161250841884c6e961d70161d5d02fdf938617bcaac4aa1ca8e06f2d2b18576ca676153714b773094238134d3dcb5596094169566366834133affb98578f21e316b4d34645ad4a1c700f56fb90a8c46d3294430640f2b14e30515215ed3b8c32c7bedd7d847e20601bfd80d6022920d9abef75523bb76b8ce3ec37c81bcf7d1008f1a3a67b153d5f335836be6fecbce4b1085cd1e1d524d81af7378bbdf7904e7d6a15d3048e356d3db7235e7f23177f8344975d19dd861f398c97739de6e7b4e13571ecc9b6700a87db127a41b51065bc240a2180edaabc13ce7343dd5fa815b67acf6d9325493e7dfef820c3453f8f8eda5e61c72ab904391bd1915ab3ef5c1b1920ae7ddcd452b1b41399f108c838de2e4ea6b70eb0a0847dbcb616fc7fa82c8aac183b005e467c7a21f2535c9cbff170e22861aa293b7f222a6a57501419f2e330e5a08a37daa776b95473c0ac37bb3177215f26a573595f893f39471d05841771fcc56d711b517c16f295e6c4cb039ce3e094ba1e8cf0496322cfb99d861488cc028a84a3f12baa5549e071c6c7b8c7c4042724d653c2ed0f282b7622aebb6786d5273424604fee2b5bc69c4944781df7364bb2a0d9bd1f2ba19b01e9a4e6650ab7eafd6c12e992afe5d7455eb1a5e4e4b88c64151d7639d93b01db07ebd2ce0eb19eae54c6a79458191de2beeca03b44ed2dc95838a0c12bce4de3b97b93f2a31a10955b66f278201f135efe06c344db566bda7e9dbfa4ce917e8e7ff1bcd539fcc22917560cc889eeea47efeb9f501bf2988ac82ca7e8110b334c8fb9e7ba2aaaa4bd93b33e37265ced667a6af2b566096ef4a47f339370a6a6535cdd12b1791b991f20668f5bef1deb05e26b1a27b32f0ec032c867af111456a5065356d2b3569d6f8780a6c8fd290c110ac5d16ab14ea16c6f2c2b14928acd5606dc8f5a3a507dfc47ac0bf2a700cbdee7f50acab9f1c3722d48c7f569e6b033a6195afa93e48670cd5682aa4a7b896d830395c4f61e8a81496cef43a486a51f40618444667189704797192fa36ebae246871041e67864585fd158d02032ff822a55301264dbed23797b775346d5579e53f49e27423fcbc3035c914c7dc770e5f444bf9dc40e04e771dbb62a0fdfd358215bdb6434f6e27d305946b3e85b46d395111d7a930f81f63e12009fc89bb856a6eb79ab94aa5937f8fa7a9aae32d08757e78a85475929b4e4f37b8440d45f8e41aae7635e6b5f719bed1ce9257784bef2b31c2a36cacbe7ffb3782b7b775c49a0d6a8e0716305b205f8679ac7c64132d609edece0ea33ee6383629424e929ec02c927b1d5704fbc60de2691e7c5eb29825a7be70c78ba0d7c8655340015883622dd5af34a8296c5af3a4da52969b18365943b13be80360e0436e02d40ce007515cb07c0a875a0e1fc19a82a4ed5f01c480b592a4aeb104376958afd41b7a0aecb0d3447c0dfd79f4bd26665a18c87f6c532e2bc880148800c0dc55404d79f1b87872f0319e446a72c2c0f4719705ae82c6ac3ffa9fc65760516a17c152aefc7d09ebe4a15cc9edf749b41063299fb9b5ad8adb807a7b7478c5c861fb2e0a2eaa4c0af2f5f795c9723b40e781ed472266f8fcc32d63549332ee30dde36390f070848f751b7cba5453e759d5570b6ccbd58448e050e2f3377da3659a8ac8ea49bd8587f4e8489cbe1c47b1e1794e4f0113220149429bdd8d2b237388358778dc8be53621fc65d6ca82bee46419952ef4b41b42489e9692add843d0512539753e8c1b7448bc74d018b4f6251f9a0d52f7545e311f0e1eda9ef1adc31c86b418cae8cc10866873dfa62e10988c6e3847e9160fd985faa48ca7c50a922f999420cc429b81d74bd899d49a3d1fa68db234520ad7818d6556dd66270c76b84f6218af447dda4a012a3f6e8a205dda179d83fac0ca4bc8daca4b8f91cfc5411437ee4236cf2360384af12e2cb18de58a3ca12c5372189c9049b35f78bc138fbee55e0caedbe640de05ea0c41607e8983e3b2db7811f1e40aac44642b8695755bf609fb864a81f6f44ab860d3c8e9a9df28269839924751165c6a3ba5cdb3ea5ea7013edaa79853eba62381457e24b95ab5a1a8c1e8c72fdd95f05d2a0e0686ba47f9ef2179445cf8313894a59bcedc2f4b29269ac1f00923d08dd31384a1017933b7c3d203a050d110f0ee3a7006a71a5d53c17946f773c00a725571daa092449387218a2b62f77211e1fc5574b2047460a83c73edf87734e6fe7220711f42d12b2ad6a86717cf5d77ab3ed78c417dd4da59ea0dfef0296ab2dcfe500274f9b6cd34be84414dc7055cc29ccd448b83e7bdf10a77aa6c78c769d4b140055412dda6d55a9dfe1d40190ab05a5fe94279dfd767c5fe1f97ad959b8cca79855185c06b18e3772fb72f0b2f81a89829f88b325257a88a0f3707ae044eb76523f37635fc24d2f510cc851f4cc1c4d5067361bab319c14dad40a2e4f971eca3621e5cf73712d89d8cb1ff8ae92578e1f6703ecec9df420742989d2de22f21bc0aa4b31ecbf4b3f3cef4402e34a40ee03bf24aa9a10781ed54a423b1053d9e51c2c1c21c10946c8eabe0be103ed3b8821d172380a16197a261dbf5aa06f0bd36dcab312edadce12e581b226256ed0f25f3297bb88030c2b3ece15ee611e5e4ff85fc5368907df997880b21e1eb227612f32e74f874b618da3af74c18c089907259917a6cb19bf1701a193b3e737306bc7da4a2152ea9e2c2e7fb61796ed811060b9ddb8fac4631fe742ba2b412d3da98aedc6ecb5f95fd2af84df724e02ffdbfb2a6d9e2d3bfab5779bd5c8914e9b982f09bd49325a868747d555b37da176cfec1ba9d35a83be4da4fa72b4150de55a6777bd134b3fe6c8229b2cf89a9974a7fe66e7734a5d2fe1321ebbc3dc48acbd90eac415e80c570b49d72a0c34f7db35e3e618387693590eff63d2958a0a8ea6dec94fb87c8421331a4a30075aad390afabe997cf03637a7e998819de23a2e3799256b1d07fe9608be97d6accc55a24133ac59b648ea164f1722b4c00a4a13c2c5aa527bbd1dc360fd4d6007c74e4ac8bb23314c57ffd4292c46b1c18942f5cd3b6cac0213c374def0df3fb315153bff27ca1ce32656434bcbe702a8965870253a656231294d9855810bb71b2b8723235e93c4484dac0f390bb7e699cdd48ba8a1fe96851873707b1b0c226e3482df53452100a52b5af61ff23cc2761ea17961ef0c89bcd9adf9fce7074fca5efb1a2eacb111b180624f970589ed36763b7e758d1f74744d535b9cd2bf010a3cdcb908c2a5614956331aed8074141e8d6d82634f51fddfa3276b692300e545632daeafb8cd0647cbbee4b1576f2d8c5f5638a90d45d76126db2d954bb78a1357014324322c8869a71e0e122aee06af783f6199d245763c680b6e6dca1f79c1e98ec7c5aaf93176c24fd7cf1a6412eb6cdb331cf63496e115af94a4702a97992383899c78fa824f8e6816b4f3518fe8986f9d2836f147aa39088bcab56fad104b6a20a5602d4ec3c9fac0f3ca6b6bf464321ef0dd673053e7f087b6c14c6526a283f75612ef77179a2e2490c66ec82d202907edd26b8e3e6ad5bc5d767b5361657edadf477d744796367d7b1ed5bae490e910fce53c89a4720afea6b509164e651f6d9b55a20ede991811da8f2a7342b2250e1560ee737f36ad1b8d40b5469febf915d1d0104daec56f0e58583a14c7b17f6ccafb05db50851bb67735d77910b9c5335a3489216d4f37425fa2fdff9637312705673c4aa11c6595eb22d216a9994f54eea37e6920225c62c26c924325d4552792a6629435ba7290c97253abcb34d18e97d5be1077c7bf4b7e6b9b33cfaf196378e2f263d18587eb78423f516aebc7894171dcdc95a803569cff6655e7f8dd137badbe31debfb8522997564a3309f8fa0295703399ec5e2d7485bd8bec4a1d7659eb9e86846c204d044fac438c791ac6dfe2828032f178fe9969be16fce2e03feb1e24e543a65ac3483afc667549f3a6ba1136a0090e842d0c0f1fb6348ce973619b7ed0a89e351a84d0c4ab20fc34b50359be8234f629bba45f43e765773a41a6398d5bcf380e09781cfd8d04deac56a658af394e20488d273435d9ee1e97c0f0eda68b01f826eb9553a61b44428c1a36144d1a6d317ffcf0648169be5ab80a3968bc4358091f0166fd11c518672e59cb14e2721f39045bb3562fbff9f80e17f4efaa94b6c633d8448579705dea1a86976323fcd78f4a3b76083df20fe250ed0238c726058c7e05a0de0eb440ed4a1ea349dfe24110339809aca722dea5549f0ca0aa7c46a51a778f9eba8db9f4b0910da688dd4a691bdec7fcc2aef41e3415dc5f0d1b69b3574adebc3dec4fbeb749f3148785369bce92fb66db47ab248bd5e5918a8be8191faa6b9604b427049c5a3f550ac636a3c6eed85e86f340611f327771b9d1f24a2d175797a0643bc1aefbf96fe56f3e540bda02a45e22bb3fefbb4ff28776d3cc66eeefb3bf7946b9720255cabfbb910f3d8886894900ec4b7dbfa8a7c3bd96922c57885a3d00465c1de4b29fd48c529dcf5cbb493087a629b6df555999cbee5fede3d58f9607ff841c5aa944979125e0a2dd14766fa9c62c39e0eca9218b880566db45f44a94578d87da1204aea7697e71e4bffc06cc81f6e73a72fa6ab7b43d526bd6eb6a31e9e5707eb7e69383fa3e677eb5546b30726fd2b0d25e56d722d9e1a1f85cb4f634c9a0b198aeee470d7b7d3fe7198da3fec1ab74bccf1ee7ff49152251dbc3d15e3c62b5aa5cd6e30c12bd2e1aff13d567d44c5d4e58a0cc41cdc5dedd86a420b7099ecc76b2879e9311c8475b870de64e63646d15fcdecf17fb12035abc98d6d4a02a73440114ca3fcd03905e16fee2315fc402aaade2034b6c43b9a4b5461f55ba4e4e79867179d68374500add531e212cb32e0403503393d50ec17304b28467409f3732aa75d0e3d139b0d6b907f94c08ba4b2e36f7d783110e03672b2b85461cb31efd74b376bdf91ba2d20ff7a5d9ebb44900e3a7c7c1608a6b4caf1b966a4c36392f453ed389bfbb1f31da2519820ad67a0d1aeeefddada2b8d6e5a37f2a4d8757e0285c30f61cedf0191adaffdcb4af86640252403e7a19012055fb139e0d36f35119f7d9ca8d2c3eb219338ecc2bbf1d7f07f7187d7f1ff8e2643e2b20335782cd57aa5603a3c545aa0edbf6de435119aad52470988d97956921096b5f64deb460099669a34990ad7fbc5e52bb9458b1bd897d497277419c5e0a3f04b2447b4ee89963f3f4e70931e878f171eff2ab145b16f8cb6a726ae757cbda563cba32259a4ac86ac8e888afbf8bb4aa16bb535f1d93dfa7014718310dbfa6a95f29c1fe25e87bd0c1c7c7b70b829eae8727c64312ce7416a1e53463f22bce78485e2cbfd4018bf5d547e3f0b8e5428f6d3558ceaf5e7911e9ea49f34ff18122021f484af2d153e16462bff65678859b516878001ff8488f6b47b76ce495143723b5889a1eb8da22fa9153acf4386c79f67da58fd57c1639af959b3bf59242bb3ba1f3cc0aef34c720cfa9d217ad9e87f8803e325d42dee8bac4c9e6a9f67c7ed509bc6ba69cbfa309d72db52ec021bb6ef108afdb474157aa156cc6508ea59cec4c3a89b478ca099fb1552fc0a489ecea2a558e4a129e7282490d3929295888f0e3a84fb38b2d00b74c4788f289006b69f5e56063be7fd4b5f80ed05e80485ddb743a0c5b5deadc4dfc00a30f8430df9476997af75b88d5d6646d6f691fffb1c50e8a8dfe8b39d9174d87307e4f8b586360d3a194323b4aac7f02eefeef80b0a758d53ed44844d276e0e6553972bc3dbaa90dde4a52210ee336f0b8f399c0e24990e7c1b221cf6424c9a3333f008e464078ee4cc70ace4866dddbe049ef96a7f059841cb01154d0ae470a1bc2b09964b75b1119f679a2487034a509b56e3bf73fe731f8c9243b1a04670537675a5d87774f7af8d90f53deb7828cac62b346081ef1348e42fb8067edda5728dc751253b4d335da5f4c6f88b0243459efb80c60ff1eb25ef0dc05b737a05ceb9ed5bbe87bb4b25ad5e411dc29d63d3a1a641775629f5aff167dc6425ef64f1bf7ff83ea96cf5373ae78420c7d02abe76413b3e739e500bef1804ab9b2dacae9e1b009d41ad33dd56f31271395f2bf2d49b0603a2941ec8dce035e41ff5b799c89bf4ec59a5931721f86c36b384e4fe240a5c335743991c076774a400b713be3632b96aacb21be0ec16e5ca317c58d879e896aea45143002a1a91a0379281fd01c3c4e7fcb38ba55715f8831f6826062326cdb47671d05e98f16b09b866170ebc3d205635fa4c492a7463670cb78207a48de165d2ef9a819f264d18ecf9e6a09dd1ae734aff4d11d0e0ab72e6dd5e7f235d723414b2c08bcecdb3aa4fd761089f869c1843205047289edeb82cf775705dd1b4eb9e21bfbe9c97f23925f18e45b53136415a2a05132f530ac993612040edec2b65a5a1195ac8f4a7e426c1ef47d987fed6895c31bd4a532b15e51883934d2fe6865cd00988f93a116edfb60f6076a549616a83705c0280279c799be7ed4df2e072e4520d89494bb05aac469aba44439ae7ef708ad7b733b1bc163f97919983f6f79ee807dc7f0bc1a798e53bfb35dba42ba7e90aa1847d707f27ba0add0c8a245d8f5ebbf258f33279dbe958ba430d8d157b3c8a277a492ad6cf05a763eecafbeacf11acd0b9fc1291a379fc43d9f792bba21eebaa89d1208249a158df8d466860b0b1732c5537ad047e541a52e3cac1ef97395a594e216a7f6f19896db34b459d18c72d677b43d5eea3255a6ff995312f4ae3c8d52b33d5960b89b20ef460a85651023d0c92face9510dc25b74a29b10470332d9796aa492d1f2663e058c9a0dff9ca24f2dfc80f4c9b42f4b95f4ff5a0d8e502b0674b0c1eae97191b6cd1a38fbe168891b8afc34e16f70f6d4bf9d041a8fcab1a08b310663aff7d5df8e2e8265001bfd81954bf536b107b6113132c7e1bcc8873e534e3610ec5cfb09a1340050127d7ad1b212e2ef6cca50b51fdda9a978afba503ac272308cb127255d08b46d47b386f755237924521b5514779c593944e1fdacf93575c3613b189388973d304f4879d676a0346a9cfd12f60985a9c32701bb77c4599458cba3480e9486e15d04763fe85b0dc75e85fb9202aea914582ee8db7eb9d1779fcd4bcc3da532b478227cbba493ccdd87edb5cbe5a7950533ae9094bae7b5e6bd8c0d4546ecf45a5494ee46c9c2a5b5295e1041b4c12b98a8f7ad34783e7d0622868ed75f3c7945393ed56690cfa67cf76cebfdf453ad454f55738ee3204d0fed574412668b77fe28bf2597d6d770411ca7755f309da5a81ed8ee68a0d907a445f6b44a9e6980ec48d38daf43a6a5f06f8bba388cafc73f7704e6a9d33e4d29939b4c9200d5f642c5f597b18e474ee751f62c9092101374cdc465486e6184aaf2d9c009e7de8940a93b32d3dc6780bf7b368be7c573f1a53769eae0be38e1cc6bd1f93f5eed9229596c93aebad5839e5fef2fc63761af779be3ee14e3c878fcf64be65accd481f3d96e2743587ad33c255aa8d8d39a94b33ea194abc1093daefb4f33f5ebba6db21cddc5ba96aed986d4d580ce85c20508a0152b80a6effc33604219ae1529097644e6c5e09ab67270010893e57371c2774919e658fbdcae96d6f9ee4712974bf40a2f8f4765bdbc308550cc6f793da8f0bd34fb6ef520a9f6651ce84d415e45ceffc784a9c47606d1dd41ed43280b78fcee17d5c7ff50480868df65c380dc189f6d0b45f449612d021e4247eeb7aebb3c6a312cc8db3b966f7bbe398775a11f43dfd0ca45c9978389ed6586874e76046509d5aff1402f47576daa484e6533bb01c15f25babb6518f74a659850fddf57d20dc42957725b2f1dbf4c2a3e8669f7e6586195f64059e7877e742232413156ffed7df9167a557937758e3a80c4e7f4b59cc2fdf94dad9535a773facd39d55de1672e43140dc9aea7b987aeb946fc21b6139398929a2ecf9f5773a036d5afe8b00e6478a0a71dff9d4f99dbc1ee008782347fe9e78ea92cf13efc79d76c487518a74eaed293bef74a57e9c104be5ede6aa777cb0c243f236bc290f74a36c37fb6f6689e6a2faba3a6547fc05715cd4af63feb6f0ef017a30dd8ee4ffd1ecc61f15a7685ca0ee5b371ad8a1060617b69afe84ccea9668aca7eb4983a39f991cc7f6c6fe5718009e049b97fdceb7032914501c9d5dc0ff716e339a458a3a8f1dea9220deefec1235c8fba5e090f2265205e71084e18f787453961f831f444e9475f4babf4235db67658e313209c26af30254a806fd95f234b64c46a48ef3e0e356f31df0f7d1c87ff0fe522fb08b7f42d9c3801abe40a218d7ba52041e07a3c908be09bd8ac121bc8da62a10a9487f5c5ccc01e9da9977da4b846ce0ebbb7b7fad0467d25c29be695f350cef30a2ab2ebb4f7eded701fa8bf02759f0fe14ab83bd1a2178501b33b49d8a76cc44eb3aa42734e972dd8ff56ab84604a207060cc7237c2c6d99608526b2d5b8e7bc7d5b20eadc1e2b4cdf7fe06bf574aed6e965a2d60b0224f8b223f6cf3d4c8eebed784f7aebad1af94aef5c32a49109c0d29dd2cd884febc33a958e957fef7fa1d4b854c2bef5ea6676024c925d3f7f6529ed3a586b188150f06854c3d14c8ea3b02bd536a6727af1b310ba922303cad0dc5b0b4fb378b8869e63026b3447b1679a83f0f5e9495c0ef99f33c5bbe6dc78be3432e898451f5d2ae742515b9d2862c6f131c24172b80b70ce68bd7f5340765a2ebf41978c8a63c7e841bf0468e978bf71e0665bfeb8eda4bf2fc71e0d17dae357a60324158793ae2d7686a9b9d9fdfaab74cf2087304783b3ae94e3b9f38dc7804cb8b63bac2e0286873d5876190494daa4706b82538cb0cfc2c683267ac4b825df0cf2caefee116c7488c2a7d2d33f20f4b068c9e1d47db12f7912b62bfaf3ae2d68b365683cf58a6e5deace4e97060315c30bfb860c28b1e8a9ea2052d8599dce5841ce7dedf0b47fe4a1f49e90f09640ad0e785bd94e64911cbcab5af74ddd3cf18e6a4137b6bbc3193651f4ba1b38dba830eac54371e526b27da168fa3f99414850f3c1c5e3b4895f25e5f8267cff864c0bce4389760eb1981f47c574dd8df50ecdf305231175c2ce3e618fca0f06f5bfa00f7e33f91d4c4b33434d5985285b2d7acf3fba0c9ac83d5cbccab01893bc7d0e50ed9fa82864022a74f4aa935555634455dfbf4e95551374f02603db964e060c7f520a7af8ddde2d6e1cfa99106508ae7cadf60c1d0caf61c0ce02f0764b60a1a76c0c9f09a2dab55472e5a79ed5240b392b9ce28d9d207b6433a01634e1448ea7142269257d4a60d98be7ad5553e5f2bc70484fbd8b2097a7e959cf52437f20958dec3cab779af3b5ffa15c82747683ce2ec0b6ba9c5a0363a42ff3638ff33edd517d263c35db17b6e51d130c1ae89cb910e2eb8d1fa7bb657f4e4cb2fbc9f1c78081fec4aac013fdf2c772d24d7f5c50e0797855b715efc70c0ebb80339f6e212ffda0bc0aa79a19aae189fcccf3bf030f41c54863df1a8df100039cf10898340482a38e78e19db8500cd14b0ac8c85ff961744ee611deeaef18cc9e6d39329149018f97d8fb4599e7f6c81035a8af187628d72813c594e708b52db26178293c17061864b0aa20ac672eb71ddbe327c1a5abc1c8fc26c42da2da12bad9e0c4166b46aa01b4671bf7a4262f8bd7387eccee2125f3d0d2344210d32afb2d00672bd891349a0be9970bfc73463ea4ed6065beea91870a601b9c183a9685d3bec5aa7f9d83b258e5b08fab2b2a1540e36d55f4dad01945deff8196dfa90fbddda0c627520ff81d19604cac052b55b0fe569c4fa7e41b846bf8dcf9e2a0e17c1b82c9bd7a2622276f6659d2ef652e4a92608eb31d9260eb8138a715fd60494e264e7abb3656b4407ed34ba5f797856b949cdb79d19941273b93f1d8f52b32a638be7b8f1a86d76cdb46342eb1923959308228e10d1f56664db333463113b60b35c276465b4ac9453ad97938876d67fbd7073dd194ce46e52e9367828fbe38366cf5232cfaeb17b75490014ee341d1e797bde17c16d2744cf0576d922414cb81f4739aaf055d1dbb8b904c61d14ad5d0d909d813e54c9cc50e3eeab82360459354e58ce847abd248258328a99f0d61f2b332a03a4036af0e5479d9b339ec3b6c2af8a8bf92bcb155547c5002676c7ede3fe84909727898588534c26b7606f6357b4590f6880b6bf544a0bbe205cc4ba5a7e7b877525db11bef023d9485ade4fae0b03485754043963b37c4b48ed6e4ca266bd4a9602dad5eb1aed565c55e75d1f08c135379d7a8ec29ca6e8d3a9d04a8bbf24ed771b8ca318589dabe5c30e09cd3d56d77fd74da56332df2b17b0b212597d5c2eb8c1893f035d1b89ce798cf7bd8637043861075eebf10e5d72d9d5bd9bdecd1523cc98b26388c9a7f4f9bd6b38f32d441422236fb313d58bf49e0c4a625caec5c1faad5ce82c47491cfdc81fb5137886faa931eaeaf89ba0b430070967666772175a933225c91cae75c81a72520e101d78c02735e4c12de43c49ddc83e55a21b1327cce6341079204c5f99d3e86b6c64b5c9f42ab190389f1499aaa8b93dafd119a2f04245b9747a52ab943027ac3853551a0b8c6a540a6cff6a6d01b4b95ca3f8891908c18b773622d94d0caca3cb519070726423059e7b04d76e7a136784c1e7c8d513e64bea4722b576b712e97acea9408782983f06384761709cfe048d2c61bd3b8eb8456d54c804a3e2f17ecb3c7a5b860141e444c03c60c27197bc2739da5f1ff12bdcfff60813d931aa55e7242c2745800503b9a61e32241a0b7f7ed202bbe23c7851353bae857aebd3f2673254c2fbbc46e3c3ce328713c7981dec4a66961ce556abd91c499d97d9e64be62ed29383984eea8abddc0201d134164c2597aa3ba29ad04d796f903f844184ff55732301ee12c82da772ece062ee5f6ee6d438ad4ba5f16b18cff3a7279ff29914e2301dd73a3f9aa7660b74666a1d8e23006d97dbc98cf677d1c247d3d8aad8cfefa9f7dc09c5c117795b5dc191f3d3e78dbec08af2a9aa343e8ce69af30f8692bed516fda6aee0e2e06816be21db5312ba937a8c127f384931289ccf1de69de16ae21a0f97071661f9636c0446fe793994cf1c9f124d9c19b6405e5215b94912155c562eca6012e94a1222ee42323fe1a89a1dcbb6557c78612f0717eeb56c64bde4e38b6e913f0df49941c77f399b4769bd01083d38e976baafddac1ea83d3e8b160acd412f599c9fde5ad3170ea9c6262586587b082b744cf31d826bb71ceb28d28eb5748848cc59c94b539e9dd045791efe545dcc99543c3f69ec0adc804b4fef00a2e206a651f34d9c1191e12caa22e25fd41f9e8065542fcc07cad7c946bee857b370bf81cab9099114aa92705c5abe8361ba33bad30eb6094af2405e51eb0e5e3ca981af54eeae9028efe05c51a235ac86ba759c2c320daf2da10d5a51f674702ff99e8f189a7c630b2fe6902778b4e56bfc2b9004e24417670f400a036c5ac502a7c522a638e6b09a2a5fab1031598516f288a7d9022709ea12d1e386a16a76bfe90d7204b52976c1a5f2e892b44dd537d4871021d4d2a6b88a5ae2715e0bbf2564bb40c26896ce8ee59c885bd3c1f27989ad27745abd64abd2eafcb0563a2aebc0d6064f0e0a49482e0d26ccbae905d8d153c10d3bfd94e2381784fdade927442491f0daa137f5b57a2d03e22ef50c2dafaecf2a0ad04c12dac4a87302c1e444e1a5ed3066482806c9d3ed92991f59891462b9aa8f19786341f289967e09b4064f45ed105d560ad9f71831a9ea7385033eb00739700101cccd495a2b212e0af83b7715332b0b4b5560298369acd79a896cf6a6e35df424520aaadbd51bffcbaaaedf484dcebc35fccaada8ec5b40b081806a7eb8e9f4f93be1038f6462d8f7f86f5dd4b4194274d3867256fd8311b410dc9e5035fdcf1745b9747eef562da85c0cfa230b0050c885a60d6ff607f6f9762efa443e483981ecef14d924a2346394d1715ec0b4116bd3b933d27a9a3b9ab6b72975ebd3fa7bf97a62121b6dee03ae7777c722fd190717fee917df85ecfe80c7e9713e2a5546deba5e26df10dc018939e87aba9f32ce6bd43c8a05a2329a38f295e200e15129bd14761e44e8e67e246f2b4e4834440237bccf782076d9229f1c74265aadd48f6207bcc86312922e6af7f9f8520a4f63f41a57e3c24c0966bd33bad56c4a85fea3024525bd78fcdf4157f8ce7e51124611c7a0af2531c41d088df90f3aa1e774c9983de16a529e05dc092055367b55c7ff8de25d495c1acfafd73cc6735cd182162120d20300ad56591b1eace31a808d10841666a57690f5afb763a5d491f42cac953267e53b7984f9fd84d2f99240bbaad8de4e87d0584a9e96b17f339628405091b4b2e7565700a10e6de788a9aaa87f4c7f35c820a97ce4ee189ef76040acd9b3586c65410758e51586c6d9b04779287f6a97aa114aca3bb291ef208aa852627915cf8f7663ecc11ddc613b5bfbba94c35956a248f0a98b0350806a3be19ffc156184f97e5d92f373629c30acf249d7ce197ab55391417dd06977f3331da0d7ddfe05455c435f640864a3100c514b51722e4faead29eb752f6a816743acedfe745a7a1e9f44712243c833235b1e0bd93d0e97d6e72272f19b3ec0f2227c25237fd2e71c8c417896ebdb10891a0885d90d1ffcb34c9b1248c7564e12a37a02f51b99dabfb70a3ee684c2385e5d53e98af97fbc74ed9b50b95c8b02f29f41ea57453de9ee50dde7ffa7142b49b5a995296c53ffcde41c0886c8fb3fce5faf33c9712fcf56b83c9cde753bb630c489087b24d03ce4ac64436525c5633e67ba4f6bd8b5c89b49871048c90aac78e5491653ce2244438593ac9169a7e1ba5481ac2a0ccb41fd4969b2b096305bda55c83077d67'
# xx = base64.b64encode(string_to_encode.encode('utf-8'))
xx = string_to_hex_to_base64(data)
print(xx)
# key = xx # AES密钥长度可以是16、24或32字节
key = utf8_parse(decrypted_message)
# message = utf8_parse(xx) # AES密钥长度可以是16、24或32字节
# message = pad(message, AES.block_size)
# print(message)
L = "2584532147856215"
# 设置模式和IV
mode = AES.MODE_CBC # 常用的模式有CBC、ECB等
iv = utf8_parse(L) # IV长度通常与模式块大小相同,例如CBC模式的块大小为16字节
print(L)
# # 创建加密对象
# cipher = AES.new(key, mode, iv)
# ciphertext = cipher.encrypt(message)
# 创建解密对象
# cipher = AES.new(key, mode, iv)
# padding = AES.pad(data, AES.block_size)
plaintext = aes_ECB_Decrypt(xx, decrypted_message, iv)
print(plaintext)
datas = json.loads(plaintext)
for row in datas:
print(row)
row["saleStatus"] = "A"
for drow in row["parkFsyyDetailDTOS"]:
drow["totalNum"] = 10
drow["stockNum"] = 5
# print(str(plaintext, 'utf-8'))
uplaintext = json.dumps(datas)
zzz = aes_ECB_Encrypt(uplaintext, decrypted_message, iv)
# plaintext = unquote(plaintext)
print(zzz)
print(xx)
udata = base64_to_hex_to_string(zzz)
print(udata)
print(data)