title: Md5 with salt encoding
body: <p>I am migrating some data from joomla based cms system to spring based Java EE environment .</p>
  
  <p>During analysis I found that md5 implementation of passwords is not same as joomla ??? Any idea why difference in md5 implementation  ??</p>
  
  <p>For example :
  if joomla record had a password field like "<code>3c57ebfec712312f30c3fd1981979f58:WnvTroeiBmd5bjGmmsVUnNjppadH7giK</code>" (here <code>3c57ebfec712312f30c3fd1981979f58</code> is final md5 hash digest and <code>WnvTroeiBmd5bjGmmsVUnNjppadH7giK</code> is key to be appended with user password input) and when the user tries to login with this record in spring system it fails.</p>
  
  <p>In spring based Java EE system , we use hash encoder as md5 and salt as some variable which is <code>WnvTroeiBmd5bjGmmsVUnNjppadH7giK</code> here.</p>
  
  <p>Junit Code snippet: <strong>This test case fails.</strong></p>
  
  <pre><code>@Test
  public void testSpringMD5Functionality() {
  
      String md5MigratedPassword = "3c57ebfec712312f30c3fd1981979f58:WnvTroeiBmd5bjGmmsVUnNjppadH7giK";
      String[] m = md5MigratedPassword.split(":");
  
      Md5PasswordEncoder passwordEncoder = new Md5PasswordEncoder();
      passwordEncoder.setEncodeHashAsBase64(false);
      boolean value = passwordEncoder.isPasswordValid(m[0], "password", m[1]);
      assertTrue(value); //test case fails ?????
  
  }
  </code></pre>