Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What kind of hash returns lower and upper case characters?

Sorry for my bad English... The string:

NFkwYnB5cjA0V09HK1Q2SHZXZHNydz09

I think it's a MD5 hash, but a MD5 returns only lower case characters and, as you can see, the result returns the both (lower and upper case).

like image 755
Angelo Cavalet Avatar asked May 21 '14 14:05

Angelo Cavalet


People also ask

Does MD5 have uppercase?

In case of MD5 they are usually encoded to 32 lowercase hexadecimal digits, so every byte is represented by 2 characters. Whether the target system accepts upper- or lowercase encodings or both is up to the system, it is unrelated to the hash function, both are different representations of a the same MD5 hash.

What characters can a MD5 hash?

A MD5 hash is a 128 bits message digest represented as 32 hexadecimal characters (0-9 and A-F). For example, “700527793dc07905fd9778bad5665e44” is a MD5 hash. The hexadecimal system is a representation of the base 16, so 16 symbols: 0123456789ABCDEF.

What characters are used in hashes?

MD5 and SHA hashes in raw form are binary, however their common representation is a hex-encoded string, which contains characters [a-fA-F0-9] . So if this is what you meant, then characters G-Z, g-z are "excluded". Another, less common, representation is Base64 encoding [0-9a-zA-Z+/].

Does capitalization matter in hashes?

yes hash output is case insensitive because its actually a hexadecimal number, rather than text.


1 Answers

It's not true that MD5 returns only lowercase characters.

A hash function returns a sequence of bytes, not a string. To print out bytes, you need a binary-to-text encoding. Whether there are uppercase characters in the printed string depends completely on which binary-to-text encoding you choose. For example, Base64 uses two character cases, which means you can have both uppercase and lowercase characters, while Base32 uses only one case.

like image 177
DCKing Avatar answered Oct 13 '22 17:10

DCKing