{"id":90842,"date":"2020-05-11T22:13:19","date_gmt":"2020-05-11T14:13:19","guid":{"rendered":"http:\/\/4563.org\/?p=90842"},"modified":"2020-05-11T22:13:19","modified_gmt":"2020-05-11T14:13:19","slug":"%e5%bf%ab%e7%96%af%e4%ba%86%ef%bc%81-cryptojs-aes-cbc-%e5%8a%a0%e5%af%86%e4%b8%ba%e5%95%a5%e5%8f%af%e4%bb%a5%e5%90%a7-iv-%e6%8c%87%e5%ae%9a%e4%b8%ba","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=90842","title":{"rendered":"\u5feb\u75af\u4e86\uff01 CryptoJS AES CBC \u52a0\u5bc6\u4e3a\u5565\u53ef\u4ee5\u5427 iv \u6307\u5b9a\u4e3a&#8221;?"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5feb\u75af\u4e86\uff01 CryptoJS AES CBC \u52a0\u5bc6\u4e3a\u5565\u53ef\u4ee5\u5427 iv \u6307\u5b9a\u4e3a&#8221;?               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : youngs <\/span>  <span><i><\/i> 14<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>var data = word; var key = CryptoJS.enc.Utf8.parse('1111111111111111'); var iv = CryptoJS.enc.Utf8.parse(''); \/\/\u52a0\u5bc6 var encrypted = CryptoJS.AES.encrypt(data, key, {iv: iv, mode: CryptoJS.mode.CBC }); <\/code><\/pre>\n<p>\u8fd9\u4e48\u641e Java \u6ca1\u529e\u6cd5\u89e3\u5bc6\u554a\u3002\u3002\u3002\u96be\u5012 CryptoJS \u6709\u9ed8\u8ba4\u7684 iv \uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1313654\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rmb1222 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/github.com\/gwjjeff\/cryptojs\/blob\/master\/lib\/AES.js#L110<br \/>https:\/\/github.com\/gwjjeff\/cryptojs\/blob\/master\/lib\/AES.js#L126<\/p>\n<p>iv \u4e3a\u7a7a\u60c5\u51b5\u4e0b\u524d 16 \u5b57\u8282\u5c31\u662f\u968f\u673a\u751f\u6210\u7684 iv                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1313655\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zxyroy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u968f\u673a\u751f\u6210\u7684\u8bdd\u4e0b\u6b21\u8981\u600e\u4e48\u89e3\u5bc6\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1313656\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : LeeSeoung <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             iv \u4e3a\u7a7a\u968f\u673a\u751f\u6210\uff0c\u89e3\u5bc6\u7684\u65f6\u5019\u5bc6\u6587\u8981\u8ddf iv \u4e00\u8d77\u63d0\u4f9b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1313657\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jiejiss <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxyroy #2 https:\/\/github.com\/gwjjeff\/cryptojs\/blob\/master\/lib\/AES.js#L126 iv \u4e3a\u7a7a\u60c5\u51b5\u4e0b\uff08\u8fd4\u56de\u7684\u5bc6\u6587\u7684\uff09\u524d 16 \u5b57\u8282\u5c31\u662f\u968f\u673a\u751f\u6210\u7684 iv<\/p>\n<p>\u590d\u8bfb\u4e86\u4e00\u4e0b #1                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1313658\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zxyroy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jiejiss \u6211\u770b\u4e86 110 \u884c\u4e4b\u540e\u592a\u8fc7\u9707\u60ca\uff0c\u5c31\u6ca1\u5f80\u4e0b\u770b 126 \u4e86\u3002\u4e0b\u6b21\u770b\u5b8c\u518d\u56de\u590d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1313659\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yukiball <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u957f\u77e5\u8bc6\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5feb\u75af\u4e86\uff01 CryptoJS AES&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/90842"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90842"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/90842\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90842"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}