Created
April 6, 2018 09:06
-
-
Save anitaa1990/7a2c493b50a5bdfab8a8356387e240d9 to your computer and use it in GitHub Desktop.
AES Encryption - Javascript
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
//Sample Implementation can be found here: https://jsfiddle.net/4zb9hrxb/1890/ | |
let key = "Q8pTgdOC7h25qKVncJlzDA==" | |
let message = "TestAnitaa009" | |
let base64Key = CryptoJS.enc.Base64.parse(key); | |
var iv = base64Key | |
let encryptedValue = CryptoJS.AES.encrypt(message, base64Key, { | |
mode: CryptoJS.mode.CBC, | |
padding: CryptoJS.pad.Pkcs7, | |
iv: base64Key | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment