Created
April 3, 2020 13:24
-
-
Save py7hon/b7fdb21a195b74590d7e7ccd548be306 to your computer and use it in GitHub Desktop.
secure image with AES encryptions
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> | |
</head> | |
<body> | |
<img src="" id="thumb"/> | |
<script type="text/javascript"> | |
function decrypt(message= '', key = ''){ | |
var code = CryptoJS.AES.decrypt(message, key); | |
var decryptedMessage = code.toString(CryptoJS.enc.Utf8); | |
return decryptedMessage; | |
} | |
document.getElementById("thumb").src = decrypt('YKrdXF1ve6nDqW2Fp7+Z7bBj1Afn1Se4SobShzztnU1/1ByGJV8n5N4SvlKBnxdm', 'QfTjWnZr4u7x!A%D*G-KaPdRgUkXp2s5'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment