jose isaias cabrera wrote: > > the question is, how can I make this java (byte) call in python? so that the > result would be the right one, "[EMAIL PROTECTED]" >
Let's get this straight: you have 40 hex digits; both your Java code and your Python code each do 20 iterations, printing the 20 bytes that you have composed. They print the same bytes; the Java code is printing the 3rd column as a signed 8-bit integer; some Python code (*NOT*, as Nick has pointed out, the code that you posted) is printing the actual byte (in some encoding or other). However some Java code (I can't believe that it was the Java code that you posted) has printed NINE bytes which bear no relation that I can see to any of the TWENTY bytes that the posted Java code should have stowed in retBuf. You claim that "[EMAIL PROTECTED]" is the right answer -- what is the question? What is it meant to be? Your routine is called PrepareHash; is it possible that you are seeing these 9 bytes _after_ hashing? Funny hashing scheme; they usually give 4, 8, 16, etc bytes, but worth an ask ... -- http://mail.python.org/mailman/listinfo/python-list