Does MD5 and SHA only contain alphanumeric characters? (i.e., from A to Z and 0 to 9, or do they exclude some characters?)
Asked
Active
Viewed 3.8k times
1 Answers
68
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+/].

wroniasty
- 7,884
- 2
- 32
- 24
-
Yeah the hex form is what I what mean. Thanks. – IMB Sep 27 '12 at 09:42
-
7It's common, but not single. Unix password files, for example, contains hashes in Base64 format [0-9a-zA-Z+/]. – Pavel Ognev Sep 28 '12 at 05:38
-
1Shouldn't an equal sign (`=`) also end up there? In base64? – deostroll Mar 25 '22 at 23:11