title: CryptoJS AES encryption with MD5 and SHA256 in C# not generated proper value
body: <p>I want to encrypt password using both in CryptoJS and C#. Unfortunately, my C# code fails to generate the proper value. This is my code</p>
  <pre><code>internal static byte[] ComputeSha256(this byte[] value)
  {
      using (SHA256 sha256Hash = SHA256.Create())
          return sha256Hash.ComputeHash(value);
  }
  
  internal static byte[] ComputeSha256(this string value) =&gt; ComputeSha256(Encoding.UTF8.GetBytes(value));
  
  internal static byte[] ComputeMD5(this byte[] value)
  {
      using (MD5 md5 = MD5.Create())
          return md5.ComputeHash(value);
  }
  
  internal static byte[] ComputeMD5(this string value) =&gt; ComputeMD5(Encoding.UTF8.GetBytes(value));
  
  internal static byte[] CombineByteArray(byte[] first, byte[] second)
  {
      byte[] bytes = new byte[first.Length + second.Length];
      Buffer.BlockCopy(first, 0, bytes, 0, first.Length);
      Buffer.BlockCopy(second, 0, bytes, first.Length, second.Length);
      return bytes;
  }
          
  internal static string EncryptPassword()
  {
      using (AesManaged aes = new AesManaged())
      {
              //CLIENT SIDE PASSWORD HASH
              /*
              var password = '12345';
              var passwordMd5 = CryptoJS.MD5(password);
              var passwordKey = CryptoJS.SHA256(CryptoJS.SHA256(passwordMd5 + '12345678') + '01234567890123456');
              var encryptedPassword = CryptoJS.AES.encrypt(passwordMd5, passwordKey, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.NoPadding });
              encryptedPassword = CryptoJS.enc.Base64.parse(encryptedPassword.toString()).toString(CryptoJS.enc.Hex);
              //encryptedPassword result is c3de82e9e8a28a4caded8c2ef0d49c80
              */
  
              var y1 = Encoding.UTF8.GetBytes(&quot;12345678&quot;);
              var y2 = Encoding.UTF8.GetBytes(&quot;01234567890123456&quot;);
              var password = &quot;12345&quot;;
              var passwordMd5 = ComputeMD5(password);
  
              var xkey = CombineByteArray(ComputeSha256(CombineByteArray(passwordMd5, y1)), y2);
              var passwordKey = ComputeSha256(xkey);
  
              aes.Key = passwordKey;
              aes.Mode = CipherMode.ECB;
              aes.Padding = PaddingMode.None;
              ICryptoTransform crypt = aes.CreateEncryptor();
              byte[] cipher = crypt.TransformFinalBlock(passwordMd5, 0, passwordMd5.Length);
              var encryptedPassword = BitConverter.ToString(cipher).Replace(&quot;-&quot;, &quot;&quot;).ToLower();
              return encryptedPassword; //e969b60e87339625c32f805f17e6f993
      }
  }
  </code></pre>
  <p>The result of the C# code above is <code>e969b60e87339625c32f805f17e6f993</code>. It should be the same with CryptoJS <code>c3de82e9e8a28a4caded8c2ef0d49c80</code>. What is wrong here?</p>