How to use Salt correctly with MD5

Asked

Viewed 34 times

0

I’m using Apache Commons Codec to encrypt system users' passwords. Ex:

DigestUtils.md5Hex(usuario.getSenha())

The problem is that depending on the password it can be easily broken, so I thought to create a complex String and always add it at the end of each password created

String salt = "3&1cNM!+<c#KtPzx*";
DigestUtils.md5Hex(usuario.getSenha()+salt)

That way all created passwords would have this concatenated string. My question is the following:

  • This would really make it difficult to break these passwords?
  • What would be the steps of generating this salt dynamically? That functionary?
  • 1

    Related: http://answall.com/q/2402/101

  • Oops, thanks @bigown hadn’t found it, my mistake.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.