title: Same password but different md5 hash
body: <p>When I pass the clear password to check the login of the user and apply a md5() on the string, the md5 hash is equal to the md5 hash stored in the MySQL database (Login succeed).</p>
  
  <p>But I don't want to transfert the user password in clear inside my POST function, so I decided to use cryptoJS to only send the key and then decrypt the password on the PHP server side.</p>
  
  <p>The problem is, when I'm using the decrypted password, the md5 is different. This is weird because the clear password string is the same than the decrypted password, and the md5 hash is different.</p>
  
  <p>By doing:</p>
  
  <pre><code> var_dump($clearPassword); //Hello.
   var_dump($decryptedPassword); //Hello.
  </code></pre>
  
  <p>But:</p>
  
  <pre><code> var_dump(md5($clearPassword)); //3ea484671d7b00a1df4734ded1aa379c1.
   var_dump(md5($decryptedPassword)); //470a1ad08cbdebe075214591ea20fec9.
  </code></pre>
  
  <p>As you can see, it's exactly the same string but the md5 hash is different, I've noticed that var_dump() give as an output:</p>
  
  <pre><code> string(16) for the $clearPassword;
   string(32) for the $decryptPassword;
  </code></pre>
  
  <p>I tried to change the string encoding but there's no luck. Anyone can explain me why md5() behave like that with those same passwords string? thanks again.</p>