Last active
August 3, 2019 04:07
-
-
Save chiyi4488/903dee5ceb3d7a3a2a9e73f5f7da8c03 to your computer and use it in GitHub Desktop.
Blogger加密文章
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Design by Cotpear _Start--> | |
請輸入密碼,以顯示內容。 | |
<input class="form-control" id="pwd" type="text" /> | |
<button class="btn btn-info" id="submitPwd" style="text-align: center;">解密</button> | |
<script> | |
var code="將您的密文貼至於此" | |
$(() => { | |
$("#submitPwd").click(() => { | |
try { | |
$("#result").html( | |
decodeURIComponent( | |
CryptoJS.AES.decrypt( | |
code, | |
$("#pwd").val() | |
).toString(CryptoJS.enc.Utf8) | |
) | |
) | |
} catch (e) { | |
alert('密碼錯誤') | |
} | |
setTimeout(() => { | |
if ($("#result").html() == "") { | |
alert('密碼錯誤') | |
} | |
}, 500) | |
}) | |
}) | |
</script> | |
<div id="result"> | |
</div> | |
<!--Design by Cotpear _End--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
原本網站為:https://jmes311chiyi.blogspot.com/2019/02/Encryption-blogger.html