Question

MD5 algorithm has 4 standard registers, A = (01234567)16, B = (89abcdef)16, C = (fedcba98)16, D = (7654321)16, while in java program, it is A=0X67452301L,B=0XEFCDAB89L,C=0X98BADCFEL,D=0X10325476L, why there is a difference?

Was it helpful?

Solution

This is likely due to an interpretation of the values in two different architectures. I suspect the register values referenced were obtained from x86 architecture which is Little-endian whereas Java is Big-endian.

http://en.wikipedia.org/wiki/Endianness

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top