{"id":64671,"date":"2026-01-23T22:04:48","date_gmt":"2026-01-23T14:04:48","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64671.html"},"modified":"2026-01-23T22:04:48","modified_gmt":"2026-01-23T14:04:48","slug":"cryptojs-aes-%e8%a7%a3%e5%af%86%e5%ae%8c%e6%95%b4%e5%ae%9e%e6%88%98%e7%a4%ba%e4%be%8b%ef%bc%88python-execjs%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64671.html","title":{"rendered":"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09"},"content":{"rendered":"<p>\u672c\u6587\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u3001\u53ef\u8fd0\u884c\u7684\u793a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 execjs \u8c03\u7528 CryptoJS \u5b9e\u73b0 AES \u89e3\u5bc6\u3002 \u9002\u5408&#xff1a;\u63a5\u53e3\u9006\u5411\u3001\u6570\u636e\u91c7\u96c6\u3001\u524d\u7aef\u52a0\u5bc6\u5206\u6790\u7b49\u573a\u666f\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u6700\u7ec8\u6548\u679c\u8bf4\u660e<\/h3>\n<p>\u6211\u4eec\u8981\u5b9e\u73b0\u7684\u6548\u679c\u662f&#xff1a;<\/p>\n<ul>\n<li>\u524d\u7aef&#xff08;JS&#xff09;\u7528 CryptoJS AES-CBC \u52a0\u5bc6 JSON<\/li>\n<li>Python \u901a\u8fc7 execjs \u8c03\u7528 JS \u89e3\u5bc6<\/li>\n<li>\u6700\u7ec8\u5728 Python \u4e2d\u62ff\u5230 \u539f\u59cb JSON \u6570\u636e <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123140447-69737fff25ff5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e8c\u3001\u51c6\u5907\u73af\u5883<\/h3>\n<h4>1\ufe0f\u20e3 \u5b89\u88c5 Node.js<\/h4>\n<p><span class=\"token function\">node<\/span> -v<\/p>\n<p>\u5982\u679c\u6ca1\u6709&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> nodejs <span class=\"token function\">npm<\/span><\/p>\n<hr \/>\n<h4>2\ufe0f\u20e3 \u5b89\u88c5 Python \u4f9d\u8d56<\/h4>\n<p>pip <span class=\"token function\">install<\/span> PyExecJS<\/p>\n<hr \/>\n<h4>3\ufe0f\u20e3 \u5b89\u88c5 CryptoJS&#xff08;JS \u4f9d\u8d56&#xff09;<\/h4>\n<p>\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">npm<\/span> init -y<br \/>\n<span class=\"token function\">npm<\/span> <span class=\"token function\">install<\/span> crypto-js<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u9879\u76ee\u76ee\u5f55\u7ed3\u6784<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123140447-69737fff3e6e6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>aes-demo\/<br \/>\n\u251c\u2500\u2500 encrypt.js     # &#xff08;\u6a21\u62df\u524d\u7aef&#xff09;AES \u52a0\u5bc6<br \/>\n\u251c\u2500\u2500 decrypt.js     # CryptoJS \u89e3\u5bc6\u51fd\u6570<br \/>\n\u251c\u2500\u2500 decrypt.py     # Python \u8c03\u7528 execjs<br \/>\n\u2514\u2500\u2500 cipher.txt     # AES \u5bc6\u6587<\/p>\n<hr \/>\n<h3>\u56db\u3001\u6a21\u62df\u524d\u7aef AES \u52a0\u5bc6&#xff08;encrypt.js&#xff09;<\/h3>\n<p>\u8fd9\u4e00\u6b65\u662f\u4e3a\u4e86\u751f\u6210\u771f\u5b9e\u5bc6\u6587&#xff0c;\u65b9\u4fbf\u4f60\u6d4b\u8bd5 \u5b9e\u9645\u9879\u76ee\u4e2d&#xff0c;\u8fd9\u4e00\u6b65\u901a\u5e38\u662f\u7f51\u7ad9\u524d\u7aef\u5b8c\u6210\u7684<\/p>\n<p><span class=\"token keyword\">const<\/span> CryptoJS <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">require<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;crypto-js&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> key <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;1234567890abcdef&#034;<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ 16 \u5b57\u8282<\/span><br \/>\n<span class=\"token keyword\">const<\/span> iv  <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;abcdef1234567890&#034;<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ 16 \u5b57\u8282<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> data <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">user<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;admin&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token literal-property property\">age<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">18<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token literal-property property\">role<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;tester&#034;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> plaintext <span class=\"token operator\">&#061;<\/span> <span class=\"token constant\">JSON<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">stringify<\/span><span class=\"token punctuation\">(<\/span>data<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> encrypted <span class=\"token operator\">&#061;<\/span> CryptoJS<span class=\"token punctuation\">.<\/span><span class=\"token constant\">AES<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">encrypt<\/span><span class=\"token punctuation\">(<\/span><br \/>\n    plaintext<span class=\"token punctuation\">,<\/span><br \/>\n    CryptoJS<span class=\"token punctuation\">.<\/span>enc<span class=\"token punctuation\">.<\/span>Utf8<span class=\"token punctuation\">.<\/span><span class=\"token function\">parse<\/span><span class=\"token punctuation\">(<\/span>key<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token literal-property property\">iv<\/span><span class=\"token operator\">:<\/span> CryptoJS<span class=\"token punctuation\">.<\/span>enc<span class=\"token punctuation\">.<\/span>Utf8<span class=\"token punctuation\">.<\/span><span class=\"token function\">parse<\/span><span class=\"token punctuation\">(<\/span>iv<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token literal-property property\">mode<\/span><span class=\"token operator\">:<\/span> CryptoJS<span class=\"token punctuation\">.<\/span>mode<span class=\"token punctuation\">.<\/span><span class=\"token constant\">CBC<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token literal-property property\">padding<\/span><span class=\"token operator\">:<\/span> CryptoJS<span class=\"token punctuation\">.<\/span>pad<span class=\"token punctuation\">.<\/span>Pkcs7<br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">toString<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>console<span class=\"token punctuation\">.<\/span><span class=\"token function\">log<\/span><span class=\"token punctuation\">(<\/span>encrypted<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd0\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">node<\/span> encrypt.js <span class=\"token operator\">&gt;<\/span> cipher.txt<\/p>\n<p>\u6b64\u65f6 cipher.txt \u4e2d\u5c31\u662f AES \u5bc6\u6587\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001CryptoJS \u89e3\u5bc6\u51fd\u6570&#xff08;decrypt.js&#xff09;<\/h3>\n<p>\u26a0\ufe0f execjs \u53ea\u80fd\u8c03\u7528\u5168\u5c40\u51fd\u6570<\/p>\n<p><span class=\"token keyword\">const<\/span> CryptoJS <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">require<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;crypto-js&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">function<\/span> <span class=\"token function\">decryptData<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">key<span class=\"token punctuation\">,<\/span> iv<span class=\"token punctuation\">,<\/span> ciphertext<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> decrypted <span class=\"token operator\">&#061;<\/span> CryptoJS<span class=\"token punctuation\">.<\/span><span class=\"token constant\">AES<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">decrypt<\/span><span class=\"token punctuation\">(<\/span><br \/>\n        ciphertext<span class=\"token punctuation\">,<\/span><br \/>\n        CryptoJS<span class=\"token punctuation\">.<\/span>enc<span class=\"token punctuation\">.<\/span>Utf8<span class=\"token punctuation\">.<\/span><span class=\"token function\">parse<\/span><span class=\"token punctuation\">(<\/span>key<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token literal-property property\">iv<\/span><span class=\"token operator\">:<\/span> CryptoJS<span class=\"token punctuation\">.<\/span>enc<span class=\"token punctuation\">.<\/span>Utf8<span class=\"token punctuation\">.<\/span><span class=\"token function\">parse<\/span><span class=\"token punctuation\">(<\/span>iv<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            <span class=\"token literal-property property\">mode<\/span><span class=\"token operator\">:<\/span> CryptoJS<span class=\"token punctuation\">.<\/span>mode<span class=\"token punctuation\">.<\/span><span class=\"token constant\">CBC<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            <span class=\"token literal-property property\">padding<\/span><span class=\"token operator\">:<\/span> CryptoJS<span class=\"token punctuation\">.<\/span>pad<span class=\"token punctuation\">.<\/span>Pkcs7<br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token keyword\">return<\/span> decrypted<span class=\"token punctuation\">.<\/span><span class=\"token function\">toString<\/span><span class=\"token punctuation\">(<\/span>CryptoJS<span class=\"token punctuation\">.<\/span>enc<span class=\"token punctuation\">.<\/span>Utf8<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<h3>\u516d\u3001Python \u8c03\u7528 JS \u89e3\u5bc6&#xff08;decrypt.py&#xff09;<\/h3>\n<p>\u8fd9\u662f\u6838\u5fc3\u4ee3\u7801 &#x1f447;<\/p>\n<p><span class=\"token keyword\">import<\/span> execjs<br \/>\n<span class=\"token keyword\">import<\/span> json<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">aes_decrypt<\/span><span class=\"token punctuation\">(<\/span>ciphertext<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    key <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;1234567890abcdef&#034;<\/span><br \/>\n    iv <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;abcdef1234567890&#034;<\/span><\/p>\n<p>    <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;decrypt.js&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;r&#034;<\/span><span class=\"token punctuation\">,<\/span> encoding<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;utf-8&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n        js_code <span class=\"token operator\">&#061;<\/span> f<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    ctx <span class=\"token operator\">&#061;<\/span> execjs<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">compile<\/span><span class=\"token punctuation\">(<\/span>js_code<span class=\"token punctuation\">)<\/span><\/p>\n<p>    plaintext <span class=\"token operator\">&#061;<\/span> ctx<span class=\"token punctuation\">.<\/span>call<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;decryptData&#034;<\/span><span class=\"token punctuation\">,<\/span> key<span class=\"token punctuation\">,<\/span> iv<span class=\"token punctuation\">,<\/span> ciphertext<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> plaintext<\/p>\n<p><span class=\"token keyword\">if<\/span> __name__ <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#034;__main__&#034;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u8bfb\u53d6\u5bc6\u6587<\/span><br \/>\n    <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;cipher.txt&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;r&#034;<\/span><span class=\"token punctuation\">,<\/span> encoding<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;utf-8&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n        cipher <span class=\"token operator\">&#061;<\/span> f<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>strip<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    result <span class=\"token operator\">&#061;<\/span> aes_decrypt<span class=\"token punctuation\">(<\/span>cipher<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u89e3\u5bc6\u540e\u7684\u5b57\u7b26\u4e32&#xff1a;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>result<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\\\\n\u89e3\u6790\u4e3a JSON&#xff1a;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    data <span class=\"token operator\">&#061;<\/span> json<span class=\"token punctuation\">.<\/span>loads<span class=\"token punctuation\">(<\/span>result<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>data<span class=\"token punctuation\">)<\/span><\/p>\n<hr \/>\n<h3>\u4e03\u3001\u8fd0\u884c\u7ed3\u679c\u793a\u4f8b<\/h3>\n<p>\u89e3\u5bc6\u540e\u7684\u5b57\u7b26\u4e32&#xff1a;<br \/>\n{&#034;user&#034;:&#034;admin&#034;,&#034;age&#034;:18,&#034;role&#034;:&#034;tester&#034;}<\/p>\n<p>\u89e3\u6790\u4e3a JSON&#xff1a;<br \/>\n{&#039;user&#039;: &#039;admin&#039;, &#039;age&#039;: 18, &#039;role&#039;: &#039;tester&#039;}<\/p>\n<p>\u2705 \u89e3\u5bc6\u6210\u529f<\/p>\n<hr \/>\n<h3>\u516b\u3001\u5173\u952e\u70b9\u603b\u7ed3&#xff08;\u4e00\u5b9a\u8981\u770b&#xff09;<\/h3>\n<h4>&#x1f539; 1. key \/ iv \/ mode \/ padding \u5fc5\u987b\u4e00\u81f4<\/h4>\n<p>\u4efb\u4f55\u4e00\u4e2a\u4e0d\u4e00\u81f4&#xff0c;\u90fd\u4f1a&#xff1a;<\/p>\n<ul>\n<li>\u89e3\u5bc6\u4e3a\u7a7a\u5b57\u7b26\u4e32<\/li>\n<li>JSON \u89e3\u6790\u5931\u8d25<\/li>\n<\/ul>\n<hr \/>\n<h4>&#x1f539; 2. execjs \u672c\u8d28\u662f\u300cPython \u2192 Node\u300d<\/h4>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<ul>\n<li>Node.js \u5fc5\u987b\u53ef\u7528<\/li>\n<li>crypto-js \u5fc5\u987b\u80fd\u88ab require<\/li>\n<\/ul>\n<hr \/>\n<h4>&#x1f539; 3. \u89e3\u5bc6\u5931\u8d25\u5148\u4e0d\u8981 json.loads<\/h4>\n<p>\u5148&#xff1a;<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>result<span class=\"token punctuation\">)<\/span><\/p>\n<hr \/>\n<h3>\u4e5d\u3001\u5e38\u89c1\u95ee\u9898\u901f\u67e5<\/h3>\n<h4>\u274c \u89e3\u5bc6\u7ed3\u679c\u4e3a\u7a7a<\/h4>\n<p>\u2714 key \/ iv \u9519 \u2714 AES \u6a21\u5f0f\u4e0d\u4e00\u81f4 \u2714 padding \u4e0d\u4e00\u81f4<\/p>\n<hr \/>\n<h4>\u274c \u62a5\u9519 Cannot find module \u2018crypto-js\u2019<\/h4>\n<p><span class=\"token function\">npm<\/span> <span class=\"token function\">install<\/span> crypto-js<\/p>\n<hr \/>\n<h4>\u274c execjs \u62a5 RuntimeUnavailableError<\/h4>\n<p>\u8bf4\u660e Node.js \u6ca1\u88c5\u6216\u4e0d\u53ef\u7528<\/p>\n<hr \/>\n<h3>\u5341\u3001\u9002\u7528\u573a\u666f<\/h3>\n<p>\u8fd9\u4e2a\u65b9\u6848\u975e\u5e38\u9002\u5408&#xff1a;<\/p>\n<ul>\n<li>Web \u63a5\u53e3 AES \u9006\u5411<\/li>\n<li>\u524d\u7aef\u52a0\u5bc6\u53c2\u6570\u5206\u6790<\/li>\n<li>Python \u81ea\u52a8\u5316\u89e3\u5bc6<\/li>\n<li>\u4e0d\u60f3\u624b\u5199 AES \u7b97\u6cd5<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u3001\u53ef\u8fd0\u884c\u7684\u793a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 execjs \u8c03\u7528 CryptoJS \u5b9e\u73b0 AES \u89e3\u5bc6\u3002 \u9002\u5408&#xff1a;\u63a5\u53e3\u9006\u5411\u3001\u6570\u636e\u91c7\u96c6\u3001\u524d\u7aef\u52a0\u5bc6\u5206\u6790\u7b49\u573a\u666f\u3002 \u4e00\u3001\u6700\u7ec8\u6548\u679c\u8bf4\u660e<br \/>\n\u6211\u4eec\u8981\u5b9e\u73b0\u7684\u6548\u679c\u662f&#xff1a;<br \/>\n\u524d\u7aef&#xff08;JS&#xff09;\u7528 CryptoJS AES-CBC \u52a0\u5bc6 JSONPython \u901a\u8fc7 execjs \u8c03\u7528 JS \u89e3\u5bc6\u6700\u7ec8\u5728 Python \u4e2d\u62ff\u5230 \u539f\u59cb JSON \u6570\u636e  \u4e8c\u3001\u51c6\u5907\u73af\u5883<br \/>\n1\ufe0f\u20e3 <\/p>\n","protected":false},"author":2,"featured_media":64669,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[81,190],"topic":[],"class_list":["post-64671","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-python","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64671.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u3001\u53ef\u8fd0\u884c\u7684\u793a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 execjs \u8c03\u7528 CryptoJS \u5b9e\u73b0 AES \u89e3\u5bc6\u3002 \u9002\u5408&#xff1a;\u63a5\u53e3\u9006\u5411\u3001\u6570\u636e\u91c7\u96c6\u3001\u524d\u7aef\u52a0\u5bc6\u5206\u6790\u7b49\u573a\u666f\u3002 \u4e00\u3001\u6700\u7ec8\u6548\u679c\u8bf4\u660e \u6211\u4eec\u8981\u5b9e\u73b0\u7684\u6548\u679c\u662f&#xff1a; \u524d\u7aef&#xff08;JS&#xff09;\u7528 CryptoJS AES-CBC \u52a0\u5bc6 JSONPython \u901a\u8fc7 execjs \u8c03\u7528 JS \u89e3\u5bc6\u6700\u7ec8\u5728 Python \u4e2d\u62ff\u5230 \u539f\u59cb JSON \u6570\u636e \u4e8c\u3001\u51c6\u5907\u73af\u5883 1\ufe0f\u20e3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64671.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-23T14:04:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123140447-69737fff25ff5.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64671.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64671.html\",\"name\":\"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-23T14:04:48+00:00\",\"dateModified\":\"2026-01-23T14:04:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64671.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64671.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64671.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64671.html","og_locale":"zh_CN","og_type":"article","og_title":"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u672c\u6587\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u3001\u53ef\u8fd0\u884c\u7684\u793a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 execjs \u8c03\u7528 CryptoJS \u5b9e\u73b0 AES \u89e3\u5bc6\u3002 \u9002\u5408&#xff1a;\u63a5\u53e3\u9006\u5411\u3001\u6570\u636e\u91c7\u96c6\u3001\u524d\u7aef\u52a0\u5bc6\u5206\u6790\u7b49\u573a\u666f\u3002 \u4e00\u3001\u6700\u7ec8\u6548\u679c\u8bf4\u660e \u6211\u4eec\u8981\u5b9e\u73b0\u7684\u6548\u679c\u662f&#xff1a; \u524d\u7aef&#xff08;JS&#xff09;\u7528 CryptoJS AES-CBC \u52a0\u5bc6 JSONPython \u901a\u8fc7 execjs \u8c03\u7528 JS \u89e3\u5bc6\u6700\u7ec8\u5728 Python \u4e2d\u62ff\u5230 \u539f\u59cb JSON \u6570\u636e \u4e8c\u3001\u51c6\u5907\u73af\u5883 1\ufe0f\u20e3","og_url":"https:\/\/www.wsisp.com\/helps\/64671.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-23T14:04:48+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123140447-69737fff25ff5.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64671.html","url":"https:\/\/www.wsisp.com\/helps\/64671.html","name":"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-23T14:04:48+00:00","dateModified":"2026-01-23T14:04:48+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64671.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64671.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64671.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"CryptoJS AES \u89e3\u5bc6\u5b8c\u6574\u5b9e\u6218\u793a\u4f8b\uff08Python + execjs\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64671"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64671\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/64669"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64671"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}