title: Encryption in C# Decryption in JS (CryptoJS)
body: <p>I do not get the same result on CryptoJS. May you please check what is wrong?</p>
  
  <p>Here is my expected input/outputs:</p>
  
  <pre><code>Encrypted String: 723024D59CF7801A295F81B9D5BB616E
  Decrypted String: stackoverflow
  </code></pre>
  
  <p>Here are my Decryption/Encryption methods in C# . Encryption is TripleDES mode CBC, I am using the same key and iv on the CryptoJS code.</p>
  
  <pre><code>public static string Encrypt(string data, string key, string iv)
  {
      byte[] bdata = Encoding.ASCII.GetBytes(data);
      byte[] bkey = HexToBytes(key);
      byte[] biv = HexToBytes(iv);
  
      var stream = new MemoryStream();
      var encStream = new CryptoStream(stream,
          des3.CreateEncryptor(bkey, biv), CryptoStreamMode.Write);
  
      encStream.Write(bdata, 0, bdata.Length);
      encStream.FlushFinalBlock();
      encStream.Close();
  
      return BytesToHex(stream.ToArray());
  }
  
  public static string Decrypt(string data, string key, string iv)
  {
      byte[] bdata = HexToBytes(data);
      byte[] bkey = HexToBytes(key);
      byte[] biv = HexToBytes(iv);
  
      var stream = new MemoryStream();
      var encStream = new CryptoStream(stream,
          des3.CreateDecryptor(bkey, biv), CryptoStreamMode.Write);
  
      encStream.Write(bdata, 0, bdata.Length);
      encStream.FlushFinalBlock();
      encStream.Close();
  
      return Encoding.ASCII.GetString(stream.ToArray());
  }
  </code></pre>
  
  <p>Here is how I do the decryption using CryptoJS</p>
  
  <pre><code>var key = "90033E3984CEF5A659C44BBB47299B4208374FB5DC495C96";
  var iv = "E6B9AFA7A282A0CA";
  
  key = CryptoJS.enc.Hex.parse(key);
  iv = CryptoJS.enc.Hex.parse(iv);
  
  
  // Input is a Hex String
  var decrypted = CryptoJS.TripleDES.decrypt('723024D59CF7801A295F81B9D5BB616E', key, { iv : iv, mode:CryptoJS.mode.CBC});
  console.log(decrypted.toString());
  </code></pre>