Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

md5 or equivalent  RSS feed

 
Peter Straw
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does java provide a simple hashing function that will return a hash if it is passed a password as a String?
Many thanks
 
Lewin Chan
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try the MessageDigest class. There's probably quite a few algorithms that you can use to generate a hash.


brgds
L
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Well the algorithm MD5 has been tested with it for success.. I hope this helps..
Regds
Lupo
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and ofcourse, if you want a very simple hash code for the string.. String object has a method hashCode() in it.
You may try that.
Lupo
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!