{"id":2939,"date":"2023-07-14T15:32:16","date_gmt":"2023-07-14T07:32:16","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=2939"},"modified":"2023-07-14T15:32:17","modified_gmt":"2023-07-14T07:32:17","slug":"%e7%9b%98%e7%82%b9%e4%ba%94%e7%a7%8d%e6%9c%80%e5%b8%b8%e8%a7%81%e5%8a%a0%e5%af%86%e7%ae%97%e6%b3%95%ef%bc%81","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/java\/%e7%9b%98%e7%82%b9%e4%ba%94%e7%a7%8d%e6%9c%80%e5%b8%b8%e8%a7%81%e5%8a%a0%e5%af%86%e7%ae%97%e6%b3%95%ef%bc%81\/","title":{"rendered":"\u76d8\u70b9\u4e94\u79cd\u6700\u5e38\u89c1\u52a0\u5bc6\u7b97\u6cd5\uff01"},"content":{"rendered":"<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"color: black;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-size: 14px;padding: 10px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;margin-bottom: 24px;\" data-mpa-powered-by=\"yiban.io\">\n<section data-mpa-template=\"t\" mpa-paragraph-type=\"ignored\" data-mpa-powered-by=\"yiban.io\" style=\"outline: 0px;font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-wrap: wrap;background-color: rgb(255, 255, 255);visibility: visible;\">\n<pre data-mpa-powered-by=\"yiban.io\" style=\"margin-bottom: 0em;outline: 0px;font-size: 16px;word-spacing: 2px;text-align: left;letter-spacing: 0.544px;color: rgb(34, 34, 34);visibility: visible;\">\n<pre style=\"outline: 0px;color: rgba(0, 0, 0, 0.9);letter-spacing: 0.544px;visibility: visible;\">\n<pre style=\"margin-bottom: 0em;outline: 0px;color: rgb(34, 34, 34);letter-spacing: 0.544px;visibility: visible;\">\n<strong style=\"outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;word-spacing: 0.8px;letter-spacing: 0.544px;caret-color: rgb(60, 60, 60);visibility: visible;\"><span style=\"outline: 0px;letter-spacing: 0.8px;word-spacing: 0.8px;color: rgb(255, 41, 65);visibility: visible;\"><strong style=\"outline: 0px;letter-spacing: 0.544px;font-family: sans-serif;color: rgb(255, 104, 39);visibility: visible;\"><span style=\"outline: 0px;font-size: 15px;font-family: Helvetica, Arial, sans-serif;visibility: visible;\"><strong style=\"outline: 0px;letter-spacing: 0.544px;caret-color: rgb(34, 34, 34);color: rgb(255, 0, 0);font-family: PingFangSC-Light;text-align: center;word-spacing: 1px;visibility: visible;\">\u60a8\u597d\uff0c\u6211\u662f\u8def\u4eba\uff0c\u66f4\u591a\u4f18\u8d28\u6587\u7ae0\u89c1\u4e2a\u4eba\u535a\u5ba2\uff1ahttp:\/\/itsoku.com<\/strong><\/span><\/strong><\/span><\/strong>\n<\/pre>\n<section class=\"mp_profile_iframe_wrp\" style=\"outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;visibility: visible;\">\n    <mp-common-profile class=\"custom_select_card mp_profile_iframe js_wx_tap_highlight\" data-pluginname=\"mpprofile\" data-weuitheme=\"light\" data-id=\"MzkwOTAyMTY2NA==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/RkqIyCg0bs5RxSfSeAUVCFlYkTgwFzSTian35nERyNxV5th5VQ64LCrrQ0HQeSCXErDw9rEKIy2JAJ00Wex8ZlQ\/0?wx_fmt=png\" data-nickname=\"Java\u5145\u7535\u793e\" data-alias=\"nihaojava8\" data-signature=\"Java\u5145\u7535\u793e\uff0c\u4e13\u6ce8\u5206\u4eabJava\u6280\u672f\u5e72\u8d27\uff0c\u5305\u62ec\u591a\u7ebf\u7a0b\u3001JVM\u3001SpringBoot\u3001SpringCloud\u3001Dubbo\u3001Zookeeper\u3001Redis\u3001\u67b6\u6784\u8bbe\u8ba1\u3001\u5fae\u670d\u52a1\u3001\u6d88\u606f\u961f\u5217\u3001Git\u3001\u9762\u8bd5\u9898\u3001\u7a0b\u5e8f\u5458\u653b\u7565\u3001\u6700\u65b0\u52a8\u6001\u7b49\u3002\" data-from=\"2\" data-origin_num=\"28\" data-isban=\"0\" data-biz_account_status=\"0\" data-index=\"0\" data-weui-theme=\"light\" data-is_biz_ban=\"0\"><\/mp-common-profile><br \/>\n<\/section>\n<\/section>\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;\">\u524d\u8a00<\/h1>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5927\u5bb6\u5e73\u65f6\u7684\u5de5\u4f5c\u4e2d\uff0c\u53ef\u80fd\u4e5f\u5728\u5f88\u591a\u5730\u65b9\u7528\u5230\u4e86\u52a0\u5bc6\u3001\u89e3\u5bc6\uff0c\u6bd4\u5982\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u7528\u6237\u7684\u5bc6\u7801\u4e0d\u80fd\u660e\u6587\u5b58\u50a8\uff0c\u8981\u5b58\u50a8\u52a0\u5bc6\u540e\u7684\u5bc6\u6587<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u7528\u6237\u7684\u94f6\u884c\u5361\u53f7\u3001\u8eab\u4efd\u8bc1\u53f7\u4e4b\u7c7b\u7684\u654f\u611f\u6570\u636e\uff0c\u9700\u8981\u52a0\u5bc6\u4f20\u8f93<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u8fd8\u6709\u4e00\u4e9b\u91cd\u8981\u63a5\u53e3\uff0c\u6bd4\u5982\u652f\u4ed8\uff0c\u5ba2\u6237\u7aef\u8981\u5bf9\u8bf7\u6c42\u751f\u6210\u4e00\u4e2a\u7b7e\u540d\uff0c\u670d\u52a1\u7aef\u8981\u5bf9\u7b7e\u540d\u8fdb\u884c\u9a8c\u8bc1<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u2026\u2026<br \/>\n<\/section>\n<\/li>\n<\/ul>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"1.117936117936118\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"407\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1.117936117936118\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png\" png\"=\"\" data-w=\"407\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   \u975e\u5e38\u5b89\u5168<br \/>\n<\/figcaption><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u90a3\u4e48\u4e0a\u9762\u63d0\u5230\u7684\u8fd9\u4e9b\u80fd\u529b\uff0c\u6211\u4eec\u90fd\u53ef\u4ee5\u5229\u7528\u54ea\u4e9b\u52a0\u5bc6\u7b97\u6cd5\u6765\u5b9e\u73b0\u5462\uff1f\u54b1\u4eec\u63a5\u7740\u5f80\u4e0b\u770b\u3002<\/p>\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;\">\u5e38\u89c1\u52a0\u5bc6\u7b97\u6cd5<\/h1>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7b97\u6cd5\u6574\u4f53\u4e0a\u53ef\u4ee5\u5206\u4e3a<strong>\u4e0d\u53ef\u9006\u52a0\u5bc6<\/strong>\uff0c\u4ee5\u53ca<strong>\u53ef\u9006\u52a0\u5bc6<\/strong>\uff0c\u53ef\u9006\u52a0\u5bc6\u53c8\u53ef\u4ee5\u5206\u4e3a<strong>\u5bf9\u79f0\u52a0\u5bc6<\/strong>\u548c<strong>\u975e\u5bf9\u79f0\u52a0\u5bc6<\/strong>\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.49537037037037035\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/20230714153123d9d9d833b.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.49537037037037035\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/20230714153123d9d9d833b.png\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   \u52a0\u5bc6\u7b97\u6cd5\u5206\u7c7b<br \/>\n<\/figcaption><\/figure>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);\"><span style=\"display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));\">\u4e0d\u53ef\u9006\u7b97\u6cd5<\/span><span style=\"float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;\"> <\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e0d\u53ef\u9006\u52a0\u5bc6\u7684\u7b97\u6cd5\u7684\u52a0\u5bc6\u662f\u4e0d\u53ef\u9006\u7684\uff0c\u5bc6\u6587\u65e0\u6cd5\u88ab\u8fd8\u539f\u6210\u539f\u6587\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6563\u5217\u7b97\u6cd5\uff0c\u5c31\u662f\u4e00\u79cd\u4e0d\u53ef\u9006\u7b97\u6cd5\u3002\u6563\u5217\u7b97\u6cd5\u4e2d\uff0c\u660e\u6587\u901a\u8fc7\u6563\u5217\u7b97\u6cd5\u751f\u6210\u6563\u5217\u503c\uff0c\u6563\u5217\u503c\u662f\u957f\u5ea6\u56fa\u5b9a\u7684\u6570\u636e\uff0c\u548c\u660e\u6587\u957f\u5ea6\u65e0\u5173\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.26666666666666666\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531233a3a8830f.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.26666666666666666\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531233a3a8830f.png\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   \u6563\u5217\u7b97\u6cd5<br \/>\n<\/figcaption><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6563\u5217\u7b97\u6cd5\u7684\u5177\u4f53\u5b9e\u73b0\u6709\u5f88\u591a\u79cd\uff0c\u5e38\u89c1\u7684\u5305\u62ecMD5\u3001SHA1\u3001SHA-224\u3001SHA-256\u7b49\u7b49\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6563\u5217\u7b97\u6cd5\u5e38\u7528\u4e8e\u6570\u5b57\u7b7e\u540d\u3001\u6d88\u606f\u8ba4\u8bc1\u3001\u5bc6\u7801\u5b58\u50a8\u7b49\u573a\u666f\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6563\u5217\u7b97\u6cd5\u662f\u4e0d\u9700\u8981\u5bc6\u94a5\u7684\uff0c\u5f53\u7136\u4e5f\u6709\u4e00\u4e9b\u4e0d\u53ef\u9006\u7b97\u6cd5\uff0c\u9700\u8981\u5bc6\u94a5\uff0c\u4f8b\u5982HMAC\u7b97\u6cd5\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;\">MD5<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">MD5\uff0c\u5168\u79f0\u4e3a\u201cMessage-Digest Algorithm 5\u201d\uff0c\u7ffb\u8bd1\u8fc7\u6765\u53eb\u201c\u4fe1\u606f\u6458\u8981\u7b97\u6cd5\u201d\u3002\u5b83\u53ef\u4ee5\u5c06\u4efb\u610f\u957f\u5ea6\u7684\u6570\u636e\u901a\u8fc7\u6563\u5217\u7b97\u6cd5\uff0c\u751f\u6210\u4e00\u4e2a\u56fa\u5b9a\u957f\u5ea6\u7684\u6563\u5217\u503c\u3002MD5\u7b97\u6cd5\u7684\u8f93\u51fa\u957f\u5ea6\u4e3a128\u4f4d\uff0c\u901a\u5e38\u752832\u4e2a16\u8fdb\u5236\u6570\u8868\u793a\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u6765\u770b\u4e0bMD5\u7b97\u6cd5\u7684Java\u4ee3\u7801\u5b9e\u73b0\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;\"><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">MD5<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;MD5_ALGORITHM&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"MD5\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">encrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;data)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u83b7\u53d6MD5\u7b97\u6cd5\u5b9e\u4f8b<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MessageDigest&nbsp;messageDigest&nbsp;=&nbsp;MessageDigest.getInstance(MD5_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u8ba1\u7b97\u6563\u5217\u503c<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;digest&nbsp;=&nbsp;messageDigest.digest(data.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Formatter&nbsp;formatter&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;Formatter();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u8865\u9f50\u524d\u5bfc0\uff0c\u5e76\u683c\u5f0f\u5316<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">for<\/span>&nbsp;(<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>&nbsp;b&nbsp;:&nbsp;digest)&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;formatter.format(<span style=\"color: #98c379;line-height: 26px;\">\"%02x\"<\/span>,&nbsp;b);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;formatter.toString();\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]&nbsp;args)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;data&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"Hello&nbsp;World\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;encryptedData&nbsp;=&nbsp;encrypt(data);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">MD5\u6709\u4e00\u4e9b\u4f18\u70b9\uff0c\u6bd4\u5982\u8ba1\u7b97\u901f\u5ea6\u5feb\u3001\u8f93\u51fa\u957f\u5ea6\u56fa\u5b9a\u3001\u5e94\u7528\u5e7f\u6cdb\u7b49\u7b49\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4f46\u662f\u4f5c\u4e3a\u4e00\u4e2a\u52a0\u5bc6\u7b97\u6cd5\uff0c\u5b83\u6709\u4e00\u4e2a\u5929\u5927\u7684\u7f3a\u70b9\uff0c\u90a3\u5c31\u662f<code style=\"padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(255, 100, 65);\">\u4e0d\u5b89\u5168<\/code>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">MD5\u7b97\u6cd5\u5df2\u7ecf\u88ab\u653b\u7834\uff0c\u800c\u4e14MD5\u7b97\u6cd5\u7684\u8f93\u51fa\u957f\u5ea6\u6709\u9650\uff0c\u653b\u51fb\u8005\u53ef\u4ee5\u901a\u8fc7\u66b4\u529b\u7834\u89e3\u6216\u5f69\u8679\u8868\u653b\u51fb\u7b49\u65b9\u5f0f\uff0c\u627e\u5230\u4e0e\u539f\u59cb\u6570\u636e\u76f8\u540c\u7684\u6563\u5217\u503c\uff0c\u4ece\u800c\u7834\u89e3\u6570\u636e\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u867d\u7136\u53ef\u4ee5\u901a\u8fc7\u52a0\u76d0\uff0c\u4e5f\u5c31\u662f\u5bf9\u5728\u539f\u6587\u91cc\u518d\u52a0\u4e0a\u4e00\u4e9b\u4e0d\u56fa\u5b9a\u7684\u5b57\u7b26\u4e32\u6765\u7f13\u89e3\uff0c\u4f46\u662f\u5b8c\u5168\u53ef\u4ee5\u7528\u66f4\u5b89\u5168\u7684SHA\u7cfb\u5217\u7b97\u6cd5\u66ff\u4ee3\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;\">SHA-256<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">SHA\uff08Secure Hash Algorithm\uff09\u7cfb\u5217\u7b97\u6cd5\u662f\u4e00\u7ec4\u5bc6\u7801\u6563\u5217\u51fd\u6570\uff0c\u7528\u4e8e\u5c06\u4efb\u610f\u957f\u5ea6\u7684\u6570\u636e\u6620\u5c04\u4e3a\u56fa\u5b9a\u957f\u5ea6\u7684\u6563\u5217\u503c\u3002SHA\u7cfb\u5217\u7b97\u6cd5\u7531\u7f8e\u56fd\u56fd\u5bb6\u5b89\u5168\u5c40\uff08NSA\uff09\u4e8e1993\u5e74\u8bbe\u8ba1\uff0c\u76ee\u524d\u5171\u6709SHA-1\u3001SHA-2\u3001SHA-3\u4e09\u79cd\u7248\u672c\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5176\u4e2dSHA-1\u7cfb\u5217\u5b58\u5728\u7f3a\u9677\uff0c\u5df2\u7ecf\u4e0d\u518d\u88ab\u63a8\u8350\u4f7f\u7528\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">SHA-2\u7b97\u6cd5\u5305\u62ec<code style=\"padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(255, 100, 65);\">SHA-224<\/code>\u3001<code style=\"padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(255, 100, 65);\">SHA-256<\/code>\u3001<code style=\"padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(255, 100, 65);\">SHA-384<\/code>\u548c<code style=\"padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(255, 100, 65);\">SHA-512<\/code>\u56db\u79cd\u6563\u5217\u51fd\u6570\uff0c\u5206\u522b\u5c06\u4efb\u610f\u957f\u5ea6\u7684\u6570\u636e\u6620\u5c04\u4e3a224\u4f4d\u3001256\u4f4d\u3001384\u4f4d\u548c512\u4f4d\u7684\u6563\u5217\u503c\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u6765\u770b\u4e00\u4e0b\u6700\u5e38\u7528\u7684<code style=\"padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(255, 100, 65);\">SHA-256<\/code>\u7684Java\u4ee3\u7801\u5b9e\u73b0\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;\"><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">SHA256<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;SHA_256_ALGORITHM&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"SHA-256\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">encrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;data)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/\u83b7\u53d6SHA-256\u7b97\u6cd5\u5b9e\u4f8b<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MessageDigest&nbsp;messageDigest&nbsp;=&nbsp;MessageDigest.getInstance(SHA_256_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/\u8ba1\u7b97\u6563\u5217\u503c<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;digest&nbsp;=&nbsp;messageDigest.digest(data.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StringBuilder&nbsp;stringBuilder&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;StringBuilder();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/\u5c06byte\u6570\u7ec4\u8f6c\u6362\u4e3a15\u8fdb\u5236\u5b57\u7b26\u4e32<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">for<\/span>&nbsp;(<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>&nbsp;b&nbsp;:&nbsp;digest)&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stringBuilder.append(Integer.toHexString((b&nbsp;&amp;&nbsp;<span style=\"color: #d19a66;line-height: 26px;\">0xFF<\/span>)&nbsp;|&nbsp;<span style=\"color: #d19a66;line-height: 26px;\">0x100<\/span>),&nbsp;<span style=\"color: #d19a66;line-height: 26px;\">1<\/span>,&nbsp;<span style=\"color: #d19a66;line-height: 26px;\">3<\/span>);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;stringBuilder.toString();\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]&nbsp;args)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;data&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"Hello&nbsp;World\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;encryptedData&nbsp;=&nbsp;encrypt(data);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">SHA-2\u7b97\u6cd5\u4e4b\u6240\u4ee5\u6bd4MD5\u5f3a\uff0c\u4e3b\u8981\u6709\u4e24\u4e2a\u539f\u56e0\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u6563\u5217\u503c\u957f\u5ea6\u66f4\u957f\uff1a\u4f8b\u5982SHA-256\u7b97\u6cd5\u7684\u6563\u5217\u503c\u957f\u5ea6\u4e3a256\u4f4d\uff0c\u800cMD5\u7b97\u6cd5\u7684\u6563\u5217\u503c\u957f\u5ea6\u4e3a128\u4f4d\uff0c\u8fd9\u5c31\u63d0\u9ad8\u4e86\u653b\u51fb\u8005\u66b4\u529b\u7834\u89e3\u6216\u8005\u5f69\u8679\u8868\u653b\u51fb\u7684\u96be\u5ea6\u3002<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u66f4\u5f3a\u7684\u78b0\u649e\u6297\u6027\uff1aSHA\u7b97\u6cd5\u91c7\u7528\u4e86\u66f4\u590d\u6742\u7684\u8fd0\u7b97\u8fc7\u7a0b\u548c\u66f4\u591a\u7684\u8f6e\u6b21\uff0c\u4f7f\u5f97\u653b\u51fb\u8005\u66f4\u96be\u4ee5\u901a\u8fc7\u9884\u8ba1\u7b97\u6216\u5de7\u5408\u627e\u5230\u78b0\u649e\u3002<br \/>\n<\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5f53\u7136\uff0cSHA-2\u4e5f\u4e0d\u662f\u7edd\u5bf9\u5b89\u5168\u7684\uff0c\u6563\u5217\u7b97\u6cd5\u90fd\u6709\u88ab\u66b4\u529b\u7834\u89e3\u6216\u8005\u5f69\u8679\u8868\u653b\u51fb\u7684\u98ce\u9669\uff0c\u6240\u4ee5\uff0c\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d\uff0c\u52a0\u76d0\u8fd8\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.836036036036036\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312468685407a.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"555\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.836036036036036\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312468685407a.png\" png\"=\"\" data-w=\"555\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   \u52a0\u76d0<br \/>\n<\/figcaption><\/figure>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);\"><span style=\"display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));\">\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5<\/span><span style=\"float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;\"> <\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u4f7f\u7528\u540c\u4e00\u4e2a\u5bc6\u94a5\u8fdb\u884c\u52a0\u5bc6\u548c\u89e3\u5bc6\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.26851851851851855\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312426261844e.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.26851851851851855\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312426261844e.png\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   \u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5<br \/>\n<\/figcaption><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u52a0\u5bc6\u548c\u89e3\u5bc6\u8fc7\u7a0b\u4f7f\u7528\u7684\u662f\u76f8\u540c\u7684\u5bc6\u94a5\uff0c\u56e0\u6b64\u5bc6\u94a5\u7684\u5b89\u5168\u6027\u81f3\u5173\u91cd\u8981\u3002\u5982\u679c\u5bc6\u94a5\u6cc4\u9732\uff0c\u653b\u51fb\u8005\u53ef\u4ee5\u8f7b\u6613\u5730\u7834\u89e3\u52a0\u5bc6\u6570\u636e\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5e38\u89c1\u7684\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u5305\u62ecDES\u30013DES\u3001AES\u7b49\u3002\u5176\u4e2d\uff0cAES\u7b97\u6cd5\u662f\u76ee\u524d\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u4e4b\u4e00\uff0c\u5177\u6709\u6bd4\u8f83\u9ad8\u7684\u5b89\u5168\u6027\u548c\u52a0\u5bc6\u6548\u7387\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;\">DES<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">DES\uff08Data Encryption Standard\uff09\u7b97\u6cd5\u662f\u4e00\u79cd\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u7531IBM\u516c\u53f8\u4e8e1975\u5e74\u7814\u53d1\uff0c\u662f\u6700\u65e9\u7684\u4e00\u79cd\u5e7f\u6cdb\u5e94\u7528\u7684\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u4e4b\u4e00\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">DES\u7b97\u6cd5\u4f7f\u752856\u4f4d\u5bc6\u94a5\u5bf9\u6570\u636e\u8fdb\u884c\u52a0\u5bc6\uff0c\u52a0\u5bc6\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u4e86\u7f6e\u6362\u3001\u66ff\u6362\u3001\u5f02\u6216\u7b49\u8fd0\u7b97\uff0c\u5177\u6709\u8f83\u9ad8\u7684\u5b89\u5168\u6027\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u6765\u770b\u4e0bDES\u7b97\u6cd5\u7684Java\u4ee3\u7801\u5b9e\u73b0\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;\"><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">DES<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;DES_ALGORITHM&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"DES\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;DES\u52a0\u5bc6\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;data&nbsp;\u5f85\u52a0\u5bc6\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;key&nbsp;&nbsp;\u5bc6\u94a5\uff0c\u957f\u5ea6\u5fc5\u987b\u4e3a8\u4f4d\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff0c\u4f7f\u7528Base64\u7f16\u7801\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">encrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;data,&nbsp;String&nbsp;key)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u5bc6\u94a5\u751f\u6210\u5bc6\u94a5\u89c4\u8303<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KeySpec&nbsp;keySpec&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;DESKeySpec(key.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u5bc6\u94a5\u89c4\u8303\u751f\u6210\u5bc6\u94a5\u5de5\u5382<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SecretKeyFactory&nbsp;secretKeyFactory&nbsp;=&nbsp;SecretKeyFactory.getInstance(DES_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u5bc6\u94a5\u5de5\u5382\u548c\u5bc6\u94a5\u89c4\u8303\u751f\u6210\u5bc6\u94a5<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SecretKey&nbsp;secretKey&nbsp;=&nbsp;secretKeyFactory.generateSecret(keySpec);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u52a0\u5bc6\u7b97\u6cd5\u83b7\u53d6\u52a0\u5bc6\u5668<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cipher&nbsp;cipher&nbsp;=&nbsp;Cipher.getInstance(DES_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u521d\u59cb\u5316\u52a0\u5bc6\u5668\uff0c\u8bbe\u7f6e\u52a0\u5bc6\u6a21\u5f0f\u548c\u5bc6\u94a5<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cipher.init(Cipher.ENCRYPT_MODE,&nbsp;secretKey);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u52a0\u5bc6\u6570\u636e<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;encryptedData&nbsp;=&nbsp;cipher.doFinal(data.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5bf9\u52a0\u5bc6\u540e\u7684\u6570\u636e\u8fdb\u884cBase64\u7f16\u7801<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;Base64.getEncoder().encodeToString(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;DES\u89e3\u5bc6\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;encryptedData&nbsp;\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff0c\u4f7f\u7528Base64\u7f16\u7801\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u5bc6\u94a5\uff0c\u957f\u5ea6\u5fc5\u987b\u4e3a8\u4f4d\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;\u89e3\u5bc6\u540e\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">decrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;encryptedData,&nbsp;String&nbsp;key)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u5bc6\u94a5\u751f\u6210\u5bc6\u94a5\u89c4\u8303<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KeySpec&nbsp;keySpec&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;DESKeySpec(key.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u5bc6\u94a5\u89c4\u8303\u751f\u6210\u5bc6\u94a5\u5de5\u5382<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SecretKeyFactory&nbsp;secretKeyFactory&nbsp;=&nbsp;SecretKeyFactory.getInstance(DES_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u5bc6\u94a5\u5de5\u5382\u548c\u5bc6\u94a5\u89c4\u8303\u751f\u6210\u5bc6\u94a5<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SecretKey&nbsp;secretKey&nbsp;=&nbsp;secretKeyFactory.generateSecret(keySpec);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5bf9\u52a0\u5bc6\u540e\u7684\u6570\u636e\u8fdb\u884cBase64\u89e3\u7801<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;decodedData&nbsp;=&nbsp;Base64.getDecoder().decode(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u52a0\u5bc6\u7b97\u6cd5\u83b7\u53d6\u89e3\u5bc6\u5668<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cipher&nbsp;cipher&nbsp;=&nbsp;Cipher.getInstance(DES_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u521d\u59cb\u5316\u89e3\u5bc6\u5668\uff0c\u8bbe\u7f6e\u89e3\u5bc6\u6a21\u5f0f\u548c\u5bc6\u94a5<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cipher.init(Cipher.DECRYPT_MODE,&nbsp;secretKey);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u89e3\u5bc6\u6570\u636e<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;decryptedData&nbsp;=&nbsp;cipher.doFinal(decodedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5c06\u89e3\u5bc6\u540e\u7684\u6570\u636e\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;String(decryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]&nbsp;args)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;data&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"Hello&nbsp;World\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;key&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"12345678\"<\/span>;&nbsp;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;encryptedData&nbsp;=&nbsp;encrypt(data,&nbsp;key);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;encryptedData);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;decryptedData&nbsp;=&nbsp;decrypt(encryptedData,&nbsp;key);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u89e3\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;decryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">DES\u7684\u7b97\u6cd5\u901f\u5ea6\u8f83\u5feb\uff0c\u4f46\u662f\u5728\u5b89\u5168\u6027\u4e0a\u9762\u5e76\u4e0d\u662f\u6700\u4f18\u9009\u62e9\uff0c\u56e0\u4e3aDES\u7b97\u6cd5\u7684\u5bc6\u94a5\u957f\u5ea6\u6bd4\u8f83\u77ed\uff0c\u88ab\u66b4\u529b\u7834\u89e3\u548c\u5dee\u5206\u653b\u51fb\u7684\u98ce\u9669\u6bd4\u8f83\u9ad8\uff0c\u4e00\u822c\u63a8\u8350\u7528\u4e00\u4e9b\u66f4\u5b89\u5168\u7684\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u6bd4\u59823DES\u3001AES\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;\">AES<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">AES\uff08Advanced Encryption Standard\uff09\u5373\u9ad8\u7ea7\u52a0\u5bc6\u6807\u51c6\uff0c\u662f\u4e00\u79cd\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u6570\u636e\u52a0\u5bc6\u548c\u4fdd\u62a4\u9886\u57df\u3002AES\u7b97\u6cd5\u4f7f\u7528\u7684\u5bc6\u94a5\u957f\u5ea6\u4e3a128\u4f4d\u3001192\u4f4d\u6216256\u4f4d\uff0c\u6bd4DES\u7b97\u6cd5\u7684\u5bc6\u94a5\u957f\u5ea6\u66f4\u957f\uff0c\u5b89\u5168\u6027\u66f4\u9ad8\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u6765\u770b\u4e0bAES\u7b97\u6cd5\u7684Java\u4ee3\u7801\u5b9e\u73b0\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;\"><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">AES<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;AES_ALGORITHM&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"AES\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;AES\u52a0\u5bc6\u6a21\u5f0f\u4e3aCBC\uff0c\u586b\u5145\u65b9\u5f0f\u4e3aPKCS5Padding<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;AES_TRANSFORMATION&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"AES\/CBC\/PKCS5Padding\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;AES\u5bc6\u94a5\u4e3a16\u4f4d<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;AES_KEY&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"1234567890123456\"<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;AES\u521d\u59cb\u5316\u5411\u91cf\u4e3a16\u4f4d<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;AES_IV&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"abcdefghijklmnop\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;AES\u52a0\u5bc6\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;data&nbsp;\u5f85\u52a0\u5bc6\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff0c\u4f7f\u7528Base64\u7f16\u7801\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">encrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;data)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5c06AES\u5bc6\u94a5\u8f6c\u6362\u4e3aSecretKeySpec\u5bf9\u8c61<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SecretKeySpec&nbsp;secretKeySpec&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;SecretKeySpec(AES_KEY.getBytes(),&nbsp;AES_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5c06AES\u521d\u59cb\u5316\u5411\u91cf\u8f6c\u6362\u4e3aIvParameterSpec\u5bf9\u8c61<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IvParameterSpec&nbsp;ivParameterSpec&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;IvParameterSpec(AES_IV.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u52a0\u5bc6\u7b97\u6cd5\u83b7\u53d6\u52a0\u5bc6\u5668<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cipher&nbsp;cipher&nbsp;=&nbsp;Cipher.getInstance(AES_TRANSFORMATION);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u521d\u59cb\u5316\u52a0\u5bc6\u5668\uff0c\u8bbe\u7f6e\u52a0\u5bc6\u6a21\u5f0f\u3001\u5bc6\u94a5\u548c\u521d\u59cb\u5316\u5411\u91cf<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cipher.init(Cipher.ENCRYPT_MODE,&nbsp;secretKeySpec,&nbsp;ivParameterSpec);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u52a0\u5bc6\u6570\u636e<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;encryptedData&nbsp;=&nbsp;cipher.doFinal(data.getBytes(StandardCharsets.UTF_8));\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5bf9\u52a0\u5bc6\u540e\u7684\u6570\u636e\u4f7f\u7528Base64\u7f16\u7801<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;Base64.getEncoder().encodeToString(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;AES\u89e3\u5bc6\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;encryptedData&nbsp;\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff0c\u4f7f\u7528Base64\u7f16\u7801\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;\u89e3\u5bc6\u540e\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">decrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;encryptedData)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5c06AES\u5bc6\u94a5\u8f6c\u6362\u4e3aSecretKeySpec\u5bf9\u8c61<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SecretKeySpec&nbsp;secretKeySpec&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;SecretKeySpec(AES_KEY.getBytes(),&nbsp;AES_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5c06AES\u521d\u59cb\u5316\u5411\u91cf\u8f6c\u6362\u4e3aIvParameterSpec\u5bf9\u8c61<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IvParameterSpec&nbsp;ivParameterSpec&nbsp;=&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;IvParameterSpec(AES_IV.getBytes());\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u6839\u636e\u52a0\u5bc6\u7b97\u6cd5\u83b7\u53d6\u89e3\u5bc6\u5668<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cipher&nbsp;cipher&nbsp;=&nbsp;Cipher.getInstance(AES_TRANSFORMATION);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u521d\u59cb\u5316\u89e3\u5bc6\u5668\uff0c\u8bbe\u7f6e\u89e3\u5bc6\u6a21\u5f0f\u3001\u5bc6\u94a5\u548c\u521d\u59cb\u5316\u5411\u91cf<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cipher.init(Cipher.DECRYPT_MODE,&nbsp;secretKeySpec,&nbsp;ivParameterSpec);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5bf9\u52a0\u5bc6\u540e\u7684\u6570\u636e\u4f7f\u7528Base64\u89e3\u7801<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;decodedData&nbsp;=&nbsp;Base64.getDecoder().decode(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u89e3\u5bc6\u6570\u636e<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;decryptedData&nbsp;=&nbsp;cipher.doFinal(decodedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u8fd4\u56de\u89e3\u5bc6\u540e\u7684\u6570\u636e<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;String(decryptedData,&nbsp;StandardCharsets.UTF_8);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]&nbsp;args)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;data&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"Hello&nbsp;World\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;encryptedData&nbsp;=&nbsp;encrypt(data);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;encryptedData);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;decryptedData&nbsp;=&nbsp;decrypt(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u89e3\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;decryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">AES\u7b97\u6cd5\u91c7\u7528\u7684\u5bc6\u94a5\u957f\u5ea6\u66f4\u957f\uff0c\u5bc6\u94a5\u7a7a\u95f4\u66f4\u5927\uff0c\u5b89\u5168\u6027\u66f4\u9ad8\uff0c\u80fd\u591f\u6709\u6548\u5730\u62b5\u6297\u66b4\u529b\u7834\u89e3\u653b\u51fb\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5f53\u7136\uff0c\u56e0\u4e3a\u5bc6\u94a5\u957f\u5ea6\u8f83\u957f\uff0c\u9700\u8981\u7684\u5b58\u50a8\u4e5f\u66f4\u591a\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5bf9\u4e8e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u800c\u8a00\uff0c\u6700\u5927\u7684\u75db\u70b9\u5c31\u5728\u4e8e\u5bc6\u94a5\u7ba1\u7406\u56f0\u96be\uff0c\u76f8\u6bd4\u800c\u8a00\uff0c\u975e\u5bf9\u79f0\u52a0\u5bc6\u5c31\u6ca1\u6709\u8fd9\u4e2a\u62c5\u5fe7\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);\"><span style=\"display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));\">\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5<\/span><span style=\"float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;\"> <\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u9700\u8981\u4e24\u4e2a\u5bc6\u94a5\uff0c\u8fd9\u4e24\u4e2a\u5bc6\u94a5\u4e92\u4e0d\u76f8\u540c\uff0c\u4f46\u662f\u76f8\u4e92\u5339\u914d\uff0c\u4e00\u4e2a\u79f0\u4e3a<strong>\u516c\u94a5<\/strong>\uff0c\u53e6\u4e00\u4e2a\u79f0\u4e3a<strong>\u79c1\u94a5<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4f7f\u7528\u5176\u4e2d\u7684\u4e00\u4e2a\u52a0\u5bc6\uff0c\u5219\u4f7f\u7528\u53e6\u4e00\u4e2a\u8fdb\u884c\u89e3\u5bc6\u3002\u4f8b\u5982\u4f7f\u7528\u516c\u94a5\u52a0\u5bc6\uff0c\u5219\u9700\u8981\u4f7f\u7528\u79c1\u94a5\u89e3\u5bc6\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.29074074074074074\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/202307141531243737eb697.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.29074074074074074\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/202307141531243737eb697.png\" png\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   \u516c\u94a5\u52a0\u5bc6\uff0c\u79c1\u94a5\u89e3\u5bc6<br \/>\n<\/figcaption><\/figure>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;\">RSA<\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">RSA\u7b97\u6cd5\u662f\u662f\u76ee\u524d\u5e94\u7528\u6700\u5e7f\u6cdb\u7684\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u7531Ron Rivest\u3001Adi Shamir\u548cLeonard Adleman\u4e09\u4eba\u57281978\u5e74\u53d1\u660e\uff0c\u540d\u5b57\u6765\u6e90\u4e09\u4eba\u7684\u59d3\u6c0f\u9996\u5b57\u6bcd\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u770b\u4e0bRSA\u7b97\u6cd5\u7684Java\u5b9e\u73b0\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;\"><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">RSA<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">final<\/span>&nbsp;String&nbsp;RSA_ALGORITHM&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"RSA\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\u751f\u6210RSA\u5bc6\u94a5\u5bf9\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;RSA\u5bc6\u94a5\u5bf9\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;KeyPair&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">generateKeyPair<\/span><span style=\"line-height: 26px;\">()<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;NoSuchAlgorithmException&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KeyPairGenerator&nbsp;keyPairGenerator&nbsp;=&nbsp;KeyPairGenerator.getInstance(RSA_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keyPairGenerator.initialize(<span style=\"color: #d19a66;line-height: 26px;\">2048<\/span>);&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/\/&nbsp;\u5bc6\u94a5\u5927\u5c0f\u4e3a2048\u4f4d<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;keyPairGenerator.generateKeyPair();\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\u4f7f\u7528\u516c\u94a5\u52a0\u5bc6\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u5f85\u52a0\u5bc6\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;publicKey&nbsp;\u516c\u94a5\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;\u52a0\u5bc6\u540e\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">encrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;data,&nbsp;PublicKey&nbsp;publicKey)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cipher&nbsp;cipher&nbsp;=&nbsp;Cipher.getInstance(RSA_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cipher.init(Cipher.ENCRYPT_MODE,&nbsp;publicKey);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;encryptedData&nbsp;=&nbsp;cipher.doFinal(data.getBytes(StandardCharsets.UTF_8));\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;Base64.getEncoder().encodeToString(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #5c6370;font-style: italic;line-height: 26px;\">\/**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\u4f7f\u7528\u79c1\u94a5\u89e3\u5bc6\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;encryptedData&nbsp;\u52a0\u5bc6\u540e\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@param<\/span>&nbsp;privateKey&nbsp;&nbsp;&nbsp;&nbsp;\u79c1\u94a5\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">@return<\/span>&nbsp;\u89e3\u5bc6\u540e\u7684\u6570\u636e\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;String&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">decrypt<\/span><span style=\"line-height: 26px;\">(String&nbsp;encryptedData,&nbsp;PrivateKey&nbsp;privateKey)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;decodedData&nbsp;=&nbsp;Base64.getDecoder().decode(encryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cipher&nbsp;cipher&nbsp;=&nbsp;Cipher.getInstance(RSA_ALGORITHM);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cipher.init(Cipher.DECRYPT_MODE,&nbsp;privateKey);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">byte<\/span>[]&nbsp;decryptedData&nbsp;=&nbsp;cipher.doFinal(decodedData);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">new<\/span>&nbsp;String(decryptedData,&nbsp;StandardCharsets.UTF_8);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">static<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]&nbsp;args)<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">throws<\/span>&nbsp;Exception&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KeyPair&nbsp;keyPair&nbsp;=&nbsp;generateKeyPair();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PublicKey&nbsp;publicKey&nbsp;=&nbsp;keyPair.getPublic();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PrivateKey&nbsp;privateKey&nbsp;=&nbsp;keyPair.getPrivate();\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;data&nbsp;=&nbsp;<span style=\"color: #98c379;line-height: 26px;\">\"Hello&nbsp;World\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;encryptedData&nbsp;=&nbsp;encrypt(data,&nbsp;publicKey);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u52a0\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;encryptedData);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;decryptedData&nbsp;=&nbsp;decrypt(encryptedData,&nbsp;privateKey);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span style=\"color: #98c379;line-height: 26px;\">\"\u89e3\u5bc6\u540e\u7684\u6570\u636e\uff1a\"<\/span>&nbsp;+&nbsp;decryptedData);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">RSA\u7b97\u6cd5\u7684\u4f18\u70b9\u662f\u5b89\u5168\u6027\u9ad8\uff0c\u516c\u94a5\u53ef\u4ee5\u516c\u5f00\uff0c\u79c1\u94a5\u5fc5\u987b\u4fdd\u5bc6\uff0c\u4fdd\u8bc1\u4e86\u6570\u636e\u7684\u5b89\u5168\u6027\uff1b\u53ef\u7528\u4e8e\u6570\u5b57\u7b7e\u540d\u3001\u5bc6\u94a5\u534f\u5546\u7b49\u591a\u79cd\u5e94\u7528\u573a\u666f\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7f3a\u70b9\u662f\u52a0\u5bc6\u3001\u89e3\u5bc6\u901f\u5ea6\u8f83\u6162\uff0c\u5bc6\u94a5\u957f\u5ea6\u8d8a\u957f\uff0c\u52a0\u5bc6\u3001\u89e3\u5bc6\u65f6\u95f4\u8d8a\u957f\uff1b\u5bc6\u94a5\u957f\u5ea6\u8fc7\u77ed\u5bb9\u6613\u88ab\u66b4\u529b\u7834\u89e3\uff0c\u5bc6\u94a5\u957f\u5ea6\u8fc7\u957f\u5219\u4f1a\u589e\u52a0\u8ba1\u7b97\u91cf\u548c\u5b58\u50a8\u7a7a\u95f4\u7684\u5f00\u9500\u3002<\/p>\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;\">\u603b\u7ed3<\/h1>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u8fd9\u4e00\u671f\u5c31\u7ed9\u5927\u5bb6\u7b80\u5355\u76d8\u70b9\u4e86\u4e00\u4e0b\u6700\u5e38\u7528\u76845\u79cd\u52a0\u5bc6\u7b97\u6cd5\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5176\u5b9e\uff0c\u8bba\u5230\u52a0\u5bc6\u89e3\u5bc6\u7b97\u6cd5\u7684\u5e94\u7528\uff0c\u6709\u4e00\u4e2a\u4e1c\u897f\uff0c\u53ef\u4ee5\u8bf4\u662f\u5e94\u7528\u5230\u4e86\u6781\u81f4\uff0c\u5b83\u662f\u4ec0\u4e48\u5462\uff1f<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u2014\u2014 <strong>HTTPS<\/strong><\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.612037037037037\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125dbdb30905.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" jpeg\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.612037037037037\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125dbdb30905.png\" jpeg\"=\"\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   https\u5de5\u4f5c\u6d41\u7a0b\u8be6\u56fe<br \/>\n<\/figcaption><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u7b80\u5355\u56de\u5fc6\u4e00\u4e0bHTTPS\u7684\u5de5\u4f5c\u6d41\u7a0b\uff0c\u548c\u7528\u5230\u7684\u52a0\u5bc6\u7b97\u6cd5\uff1a<\/p>\n<ol data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u5ba2\u6237\u7aef\u53d1\u8d77HTTPS\u8bf7\u6c42\uff1a\u7528\u6237\u4f7f\u7528\u6d4f\u89c8\u5668\u8f93\u5165\u7f51\u5740\u8bbf\u95eeHTTPS\u7ad9\u70b9\uff0c\u51c6\u5907\u53d1\u8d77HTTPS\u8bf7\u6c42<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u670d\u52a1\u7aef\u63d0\u4f9b\u8bc1\u4e66\uff1a\u670d\u52a1\u5668\u8fd4\u56de\u516c\u94a5\u8bc1\u4e66\uff0c\u8bc1\u4e66\u5305\u542b\u4e86\u670d\u52a1\u5668\u7684\u516c\u94a5\u3001\u9881\u53d1\u8005\uff08\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff09\u7b49\u4fe1\u606f<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u5ba2\u6237\u7aef\u9a8c\u8bc1\u8bc1\u4e66\uff1a\u6d4f\u89c8\u5668\u9a8c\u8bc1\u8bc1\u4e66\u7684\u6709\u6548\u6027\u3001\u5408\u6cd5\u6027\u3001\u6765\u6e90\u7b49\uff0c\u6821\u9a8c\u8bc1\u4e66\u7684\u8fc7\u7a0b\u7528\u5230\u4e86<strong style=\"color: black;\">\u975e\u5bf9\u79f0\u52a0\u5bc6<\/strong>\u548c<strong style=\"color: black;\">\u6563\u5217\u7b97\u6cd5<\/strong><br \/>\n<\/section>\n<\/li>\n<ul style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n     \u5ba2\u6237\u7aef\u4f7f\u7528\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u7684<strong style=\"color: black;\">\u516c\u94a5<\/strong>\u5bf9\u8bc1\u4e66\u8fdb\u884c\u9a8c\u8bc1\uff0c\u4fdd\u8bc1\u8bc1\u4e66\u7684\u771f\u5b9e\u6027\u548c\u5408\u6cd5\u6027<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n     \u5ba2\u6237\u7aef\u4f7f\u7528\u8bc1\u4e66\u4e2d\u7684<strong style=\"color: black;\">\u516c\u94a5<\/strong>\u5bf9\u670d\u52a1\u7aef\u7684\u6570\u5b57\u7b7e\u540d\u8fdb\u884c\u9a8c\u8bc1\uff0c\u4fdd\u8bc1\u670d\u52a1\u5668\u7684\u8eab\u4efd\u548c\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n     \u5ba2\u6237\u7aef\u4f7f\u7528<strong style=\"color: black;\">\u6563\u5217\u7b97\u6cd5<\/strong>\u8ba1\u7b97\u51fa\u6563\u5217\u503c\uff0c\u548c\u8bc1\u4e66\u79cd\u7684\u6563\u5217\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4fdd\u8bc1\u8bc1\u4e66\u7684\u5b8c\u6574\u6027<br \/>\n<\/section>\n<\/li>\n<\/ul>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u5ba2\u6237\u7aef\u751f\u6210\u5bf9\u79f0\u5bc6\u94a5\uff1a\u5ba2\u6237\u7aef\u751f\u6210\u4e00\u4e2a\u968f\u673a\u6570\uff0c\u4f5c\u4e3a\u5bf9\u79f0\u5bc6\u94a5<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u5bf9\u79f0\u5bc6\u94a5\u52a0\u5bc6\u4f20\u8f93\uff1a\u5ba2\u6237\u7aef\u4f7f\u7528\u670d\u52a1\u5668\u7684<strong style=\"color: black;\">\u516c\u94a5<\/strong>\u5bf9\u968f\u673a\u6570\u8fdb\u884c\u52a0\u5bc6\uff0c\u7136\u540e\u5c06\u52a0\u5bc6\u540e\u7684\u4fe1\u606f\u4f20\u8f93\u7ed9\u670d\u52a1\u5668<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u670d\u52a1\u7aef\u83b7\u53d6\u5bf9\u79f0\u5bc6\u94a5\uff1a\u670d\u52a1\u7aef\u4f7f\u7528<strong style=\"color: black;\">\u79c1\u94a5<\/strong>\u89e3\u5bc6\u5ba2\u6237\u7aef\u53d1\u9001\u7684\u5bf9\u79f0\u5bc6\u94a5\uff0c\u5f97\u5230\u5bf9\u79f0\u5bc6\u94a5<br \/>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u5668\u4f7f\u7528<strong style=\"color: black;\">\u5bf9\u79f0\u5bc6\u94a5<\/strong>\u8fdb\u884c\u901a\u4fe1\uff1a\u670d\u52a1\u5668\u4e0e\u6d4f\u89c8\u5668\u90fd\u4f7f\u7528\u5bf9\u79f0\u5bc6\u94a5\u5bf9\u6570\u636e\u8fdb\u884c\u52a0\u5bc6\u548c\u89e3\u5bc6\uff0c\u4ee5\u6b64\u786e\u4fdd\u6570\u636e\u4f20\u8f93\u7684\u5b89\u5168\u6027\u3002<br \/>\n<\/section>\n<\/li>\n<\/ol>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u6570\u636e\u4f20\u8f93\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4e5f\u7528\u5230\u4e86\u6563\u5217\u7b97\u6cd5\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u6d88\u606f\u6458\u8981\uff1a\u5728\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\uff0c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u90fd\u4f7f\u7528<strong style=\"color: black;\">\u6563\u5217\u7b97\u6cd5<\/strong>\u8ba1\u7b97\u6d88\u606f\u7684\u6563\u5217\u503c\uff0c\u5bf9\u65b9\u6536\u5230\u6d88\u606f\u540e\uff0c\u4f1a\u5bf9\u6563\u5217\u503c\u8fdb\u884c\u6bd4\u8f83\uff0c\u786e\u4fdd\u4f20\u8f93\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002<br \/>\n<\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u603b\u4e4b\uff0cHTTPS\u4f7f\u7528\u4e86\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u3001\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u3001\u6563\u5217\u7b97\u6cd5\u6765\u4fdd\u8bc1\u6570\u636e\u7684\u5b89\u5168\u6027\u548c\u5b8c\u6574\u6027\uff0c\u4ece\u800c\u786e\u4fdd\u4e86\u901a\u4fe1\u53cc\u65b9\u7684\u8eab\u4efd\u548c\u6570\u636e\u7684\u5b89\u5168\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"1.217068645640074\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/202307141531253e3e5f806.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" png\"=\"\" data-w=\"539\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1.217068645640074\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/202307141531253e3e5f806.png\" png\"=\"\" data-w=\"539\" style=\"display: block;margin-right: auto;margin-left: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;\"><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 12px;\">\n   https\u771f\u540a<br \/>\n<\/figcaption><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u81f3\u4e8e\u5177\u4f53\u4f7f\u7528\u54ea\u4e9b\u52a0\u5bc6\u7b97\u6cd5\uff0c\u53d6\u51b3\u4e8eSSL\/TLS\u534f\u8bae\u7684\u7248\u672c\u4ee5\u53ca\u534f\u5546\u8fc7\u7a0b\u4e2d\u9009\u5b9a\u7684\u52a0\u5bc6\u5957\u4ef6\u3002\u5728\u5b9e\u9645\u7684\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u5f88\u591a\u52a0\u5bc6\u7b97\u6cd5\u53ef\u80fd\u4f1a\u88ab\u6dd8\u6c70\uff0c\u4ee5\u9002\u5e94\u66f4\u9ad8\u5b89\u5168\u6027\u7684\u9700\u8981\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u6211\u4eec\u7684\u65e5\u5e38\u5f00\u53d1\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u501f\u9274\u76f8\u5e94\u7684\u601d\u8def\uff0c\u7075\u6d3b\u8fd0\u7528\u5404\u79cd\u52a0\u5bc6\u7b97\u6cd5\uff0c\u8ba9\u6211\u4eec\u7684\u5e94\u7528\u66f4\u52a0\u5b89\u5168\u3001\u66f4\u52a0\u5065\u58ee\u3002<\/p>\n<p> <br data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/p>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"height: 1px;margin-top: 10px;margin-bottom: 10px;border-right: none;border-bottom: none;border-left: none;border-top-style: solid;border-top-color: black;\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><strong>\u53c2\u8003\uff1a<\/strong><\/p>\n<section style=\"padding-top: 8px;padding-bottom: 8px;line-height: normal;\">\n  <span style=\"font-size: 12px;\">[1]. https:\/\/segmentfault.com\/a\/1190000023445325<\/span><br \/>\n<\/section>\n<section style=\"padding-top: 8px;padding-bottom: 8px;line-height: normal;\">\n  <span style=\"font-size: 12px;\">[2]. https:\/\/juejin.cn\/post\/6844903638117122056<\/span><br \/>\n<\/section>\n<h2 style=\"margin-top: 1em;margin-bottom: 1em;outline: 0px;font-weight: bold;font-size: 1.5em;text-wrap: wrap;color: rgb(62, 62, 62);line-height: inherit;border-bottom: 2px solid black;text-align: center;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 2px;word-spacing: 2px;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"outline: 0px;font-size: inherit;color: inherit;line-height: inherit;visibility: visible;\">\u66f4\u591a\u597d\u6587\u7ae0<\/span><\/h2>\n<ul class=\"list-paddingleft-1\" style=\"outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;text-wrap: wrap;font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);list-style-type: circle;visibility: visible;\">\n<ol class=\"list-paddingleft-1\" style=\"outline: 0px;visibility: visible;\">\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933285&amp;idx=1&amp;sn=f5507c251b84c3405f2fe0f7fb1da97d&amp;chksm=88621b9bbf15928dd4c26f52b2abb0e130cde02100c432f33f0e90123b5e4b20d43017c1030e&amp;token=1916804008&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >Java\u9ad8\u5e76\u53d1\u7cfb\u5217\uff08\u517134\u7bc7\uff09<\/a><\/p>\n<\/li>\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933461&amp;idx=1&amp;sn=67cd31469273b68a258d963e53b56325&amp;chksm=88621c6bbf15957d7308d81cd8ba1761b356222f4c6df75723aee99c265bd94cc869faba291c&amp;token=1916804008&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >MySql\u9ad8\u624b\u7cfb\u5217\uff08\u517127\u7bc7\uff09<\/a><\/p>\n<\/li>\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933753&amp;idx=1&amp;sn=0b41083939980be87a61c4f573792459&amp;chksm=88621d47bf1594516092b662c545abfac299d296e232bf25e9f50be97e002e2698ea78218828&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >Maven\u9ad8\u624b\u7cfb\u5217\uff08\u517110\u7bc7\uff09<\/a><\/p>\n<\/li>\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933868&amp;idx=1&amp;sn=ed16ef4afcbfcb3423a261422ff6934e&amp;chksm=88621dd2bf1594c4baa21b7adc47456e5f535c3358cd11ddafb1c80742864bb19d7ccc62756c&amp;token=1400407286&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >Mybatis\u7cfb\u5217\uff08\u517112\u7bc7\uff09<\/a><\/p>\n<\/li>\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933452&amp;idx=1&amp;sn=48b3b1cbd27c50186122fef8943eca5f&amp;chksm=88621c72bf159564e629ee77d180424274ae9effd8a7c2997f853135b28f3401970793d8098d&amp;token=1919005508&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >\u804a\u804adb\u548c\u7f13\u5b58\u4e00\u81f4\u6027\u5e38\u89c1\u7684\u5b9e\u73b0\u65b9\u5f0f<\/a><\/p>\n<\/li>\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933334&amp;idx=1&amp;sn=3a68da36e4e21b7339418e40ab9b6064&amp;chksm=88621be8bf1592fe5301aab732fbed8d1747475f4221da341350e0cc9935225d41bf79375d43&amp;token=1919005508&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >\u63a5\u53e3\u5e42\u7b49\u6027\u8fd9\u4e48\u91cd\u8981\uff0c\u5b83\u662f\u4ec0\u4e48\uff1f\u600e\u4e48\u5b9e\u73b0\uff1f<\/a><\/p>\n<\/li>\n<li style=\"margin-bottom: 0.5em;outline: 0px;color: inherit;line-height: inherit;visibility: visible;\">\n<p style=\"outline: 0px;visibility: visible;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MTkxMDQ4MQ==&amp;mid=2648933878&amp;idx=1&amp;sn=bebd543c39d02455456680ff12e3934b&amp;chksm=88621dc8bf1594de6b50a760e4141b80da76442ba38fb93a91a3d18ecf85e7eee368f2c159d3&amp;token=799820369&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" target=\"_blank\" data-linktype=\"2\" style=\"outline: 0px;color: rgb(30, 107, 184);cursor: pointer;line-height: inherit;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >\u6cdb\u578b\uff0c\u6709\u70b9\u96be\u5ea6\uff0c\u4f1a\u8ba9\u5f88\u591a\u4eba\u61f5\u903c\uff0c\u90a3\u662f\u56e0\u4e3a\u4f60\u6ca1\u6709\u770b\u8fd9\u7bc7\u6587\u7ae0\uff01<\/a><\/p>\n<\/li>\n<\/ol>\n<\/ul>\n<pre style=\"outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;font-weight: 700;orphans: 4;widows: 1;caret-color: rgb(51, 51, 51);background-color: rgb(255, 255, 255);word-spacing: 0.8px;letter-spacing: 0.8px;visibility: visible;\">  <section style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;letter-spacing: 0.544px;white-space: normal;text-align: center;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;line-height: 1.75em;visibility: visible;\">\n   <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"1.2204545454545455\" data-w=\"440\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125d1d1a3b51.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" style=\"outline: 0px;display: initial;visibility: visible !important;width: 440px !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1.2204545454545455\" data-w=\"440\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125d1d1a3b51.png\" style=\"outline: 0px;display: initial;visibility: visible !important;width: 440px !important;\"><\/noscript>\n  <\/section>\n  <section style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;letter-spacing: 0.544px;white-space: normal;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;line-height: 1.75em;\">\n   <span style=\"outline: 0px;color: rgb(255, 0, 0);\">\u2193<strong style=\"outline: 0px;text-align: center;\">\u2193<strong style=\"outline: 0px;\">\u2193&nbsp;<\/strong><\/strong>\u70b9\u51fb\u9605\u8bfb\u539f\u6587\uff0c\u76f4\u8fbe\u4e2a\u4eba\u535a\u5ba2<\/span>\n  <\/section>\n<strong style=\"outline: 0px;color: rgb(62, 62, 62);font-size: 15px;word-spacing: 2px;caret-color: rgb(255, 0, 0);font-family: Optima-Regular, PingFangTC-light;letter-spacing: 1.5px;\"><span style=\"outline: 0px;font-size: 18px;color: rgb(0, 0, 0);\">\u4f60\u5728\u770b\u5417<\/span><\/strong>\n<\/pre>\n<\/section>\n<p style=\"display: none;margin-bottom: 24px;\">\n <mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\uff1ahttps:\/\/mp.weixin.qq.com\/s\/quYrV7en7ezeNdaRoXOgnA<\/p>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u60a8\u597d\uff0c\u6211\u662f\u8def\u4eba\uff0c\u66f4\u591a\u4f18\u8d28\u6587\u7ae0\u89c1\u4e2a\u4eba\u535a\u5ba2\uff1ahttp:\/\/itsoku.com \u524d\u8a00 \u5927\u5bb6\u5e73\u65f6\u7684\u5de5\u4f5c\u4e2d\uff0c\u53ef\u80fd\u4e5f\u5728\u5f88\u591a\u5730\u65b9\u7528\u5230\u4e86\u52a0\u5bc6\u3001\u89e3 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2,22],"tags":[],"class_list":["post-2939","post","type-post","status-publish","format-standard","hentry","category-java","category-22"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531239393b9ddd.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/20230714153123d9d9d833b.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/20230714153123d9d9d833b.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531233a3a8830f.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-23\/202307141531233a3a8830f.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312468685407a.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312468685407a.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312426261844e.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/2023071415312426261844e.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/202307141531243737eb697.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-24\/202307141531243737eb697.png","id":"image11"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125dbdb30905.png","id":"image12"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125dbdb30905.png","id":"image13"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/202307141531253e3e5f806.png","id":"image14"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/202307141531253e3e5f806.png","id":"image15"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125d1d1a3b51.png","id":"image16"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/15-31-25\/20230714153125d1d1a3b51.png","id":"image17"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Java","post_date":"2023-07-14","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":328,"next_post_id":2965,"next_post_title":"\u770b\u5230\u6700\u540e\uff0c\u4f60\u624d\u53d1\u73b0JAVA\u4e2d\u6ce8\u89e3\u539f\u6765\u662f\u8fd9\u4e48\u505a\u5230\u7684\uff01","previous_post_id":2908,"previous_post_title":"\u62ff\u6765\u5c31\u7528\u7684Java\u6d77\u62a5\u751f\u6210\u5668ImageCombiner\uff08\u4e00\uff09","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2939"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2939\/revisions"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}