Encrypted Blog Using CryptoJS
Introduction
Want to hide something that only you can see in your public blog? Encrypt your content in a few steps!
Demo
Tutorial
Import CryptoJS.
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
Convert your content into ciphertext in console. DO NOT commit or it will leak from git history.
CryptoJS.AES.encrypt("Hello world", "key").toString();
Save the ciphertext.
var ciphertext = "U2FsdGVkX19ZS8PPl0RE2pIZYe6oz4+mdwJvuzC3idc=";
Decrypt ciphertext with the key from input and convert to string.
var bytes = CryptoJS.AES.decrypt(ciphertext, key);
var text = bytes.toString(CryptoJS.enc.Utf8);