Created
January 30, 2020 19:57
-
-
Save betray32/3e89b139ff31c61bd4664905f6c01a3a to your computer and use it in GitHub Desktop.
Permite encriptar con el AES256 en javascript con la libreria CryptoJS
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
function encriptarAes() { | |
const key = "z|8v2,.B'%CyH9%{_~='2.|+;`z>^4{N"; | |
const keyutf = CryptoJS.enc.Utf8.parse(key); | |
var plaintext = ("16625261K"); | |
var output = CryptoJS.AES.encrypt(plaintext, keyutf, { | |
mode : CryptoJS.mode.ECB | |
}); | |
console.log("Encriptado: " + output.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment