I am using OpenSSL to encrypt a txt file, with "Hello World" inside, using the following command at the terminal:
openssl enc -aes-128-ctr -in file.txt -out file-out-64.txt -base64 -A
-K 0123456789abcdef0123456789abcdef -iv 00000000000000000000000000000000`
So, I am using AES-128 (CTR mode) with that dummy key and IV and generating a base64 at the end, producing the following output: Mc6prldI+uuh5Ko=
I want to decrypt this with CryptoJS and I am using the following code:
CryptoJS.AES.decrypt(
"Mc6prldI+uuh5Ko=",
CryptoJS.enc.Hex.parse("0123456789abcdef0123456789abcdef"),
{
iv : CryptoJS.enc.Hex.parse("00000000000000000000000000000000"),
mode : CryptoJS.mode.CTR
}
);
I was expecting "Hello World" output but it's producing an empty string result. Can anybody help?