0

I am looking for precise algorithm of MD5 or SHA-1. Everything what i found in google, wiki etc. is very confusing, not clear and not precise to me. Does anybody have implementation of that algorithm. I was looking for this in google for several hours yesterday and could find nothing. I know how to generate it using libraries(and I've done it many times).

Yoda
  • 17,363
  • 67
  • 204
  • 344
  • possible duplicate of [Generate MD5 hash in Java](http://stackoverflow.com/questions/415953/generate-md5-hash-in-java) – duffymo Jul 05 '12 at 13:56
  • I've said that i know how to use libraries to generate MD. Please read the description. – Yoda Jul 05 '12 at 13:59
  • 1
    Would it kill you to look at the source code for the class? It ships with the JDK. Please use your head. – duffymo Jul 05 '12 at 14:24

1 Answers1

1

A simple googling: SHA-1 and MD5

shem
  • 4,686
  • 2
  • 32
  • 43
  • Both never worked. First does not use Java notation for (i=0; i< 2) { s = "0"+s; } if (s.length() > 2) { s = s.substring(s.length()-2); } sb.append(s); } b = MD5STEP(F4, b, c, d, a, inint[13] + 0x4e0811a1, 21); F4 is not declared and it lacks few methods which are called in code. – Yoda Jul 05 '12 at 14:12
  • Second one SHA1 Convert.intToHex( H1, result); has sth like that which have not even right to work. Don't know why it is published. – Yoda Jul 05 '12 at 14:13
  • Even if i comment this ConvertintToHex there is always arrayoutofboundsException – Yoda Jul 05 '12 at 14:20
  • I admit- haven't tried none of this. but sounds like with a little work on this code you can complete your homework. – shem Jul 05 '12 at 14:26
  • I have holidays ; ) I am doing it for someone else. I am going to work on it. – Yoda Jul 05 '12 at 14:30