Page 1 of 1

Why Hex() returns upper case letters?

Posted: Thu Jan 08, 2015 3:08 pm
by Lebostein
....but other hex functions returns lower cased letters, for example MD5Fingerprint() or SHA1Fingerprint().
This is not consistent. Or what is the reason for that?

Re: Why Hex() returns upper case letters?

Posted: Thu Jan 08, 2015 3:17 pm
by PB Fanatic
I read it's because of using the "0x" prefix in some languages, so that "0xBEEF" doesn't look like "0xbeef". MD5 and SHA1 don't get prefixed with "0x", so their case doesn't matter. Perhaps they should go in upper case to match hex, but common use always has them in lower case (see MD5 and SHA1 in Wikipedia).

Re: Why Hex() returns upper case letters?

Posted: Thu Jan 08, 2015 3:55 pm
by luis
Uppercase is better for energy consumption.

Re: Why Hex() returns upper case letters?

Posted: Thu Jan 08, 2015 4:01 pm
by heartbone
Lebostein wrote:....but other hex functions returns lower cased letters, for example MD5Fingerprint() or SHA1Fingerprint().
This is not consistent. Or what is the reason for that?
Are you suggesting DISCRIMINATION??? :?: :|