Here is my information:
- Plain Text: ---------------------------------------------------
- do not encode
- Key: ------------------------------------
- do not encode
- Ecryption Algorithm: 3DES, CBC mode with symmetric key
- Init Vector : ------------------------------
- I knew only "iv must be hexa form"
Desired Output:
----------------------------------------------------------------------------
I'm using this library: https://cdn.rawgit.com/CryptoStore/crypto-js/3.1.2/build/rollups/tripledes.js
My function to encrypt:
function encryptByDES(message, key){
var iv = CryptoJS.lib.WordArray.create(8);
var encrypted = CryptoJS.TripleDES.encrypt(message, key, {
iv: key,
mode: CryptoJS.mode.CBC
});
return encrypted.toString();
}
Actual Output:
----------------------------------------------------------------------------
Question: How do I achieve my desired output?