> However I wonder how you translate the stuff below? > > /* > * copy the resulting 64 bits to the result buffer in little endian > * fashion (analogous to the way MD4Final() and MD5Final() do). > */ > for (i = 0, j = 0; j < 8; i++, j += 4) > { > result[j] = (unsigned char)(sha.digest[i] & 0xff); > result[j+1] = (unsigned char)((sha.digest[i] >> 8) & 0xff); > result[j+2] = (unsigned char)((sha.digest[i] >> 16) & 0xff); > result[j+3] = (unsigned char)((sha.digest[i] >> 24) & 0xff); > }
This code just move the digest bytes to the result, low byte first. You can write almost same code in Delphi. Declarations are missing, but at first glance, digest array in an array of 32 bit integers while result is an array of char. -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be