Welcome to the Ranch Find copies of Effective Java by Bloch, or Thinking in Java by Eckel, which used to be available free on the web (3/e), or Google for Niklaus Wirth's Algorithms book. You should find details of hashing algorithms in those.
And if you want to hash something using MD5 or SHA you should look at MessageDigest.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.