The sha1 hash for 64test64xa is 6779c53432b8badf049bb9d8924a5785dd887243 which is 41 characters only using hexadecimal, 10digits and 6letters. But how long it would be if it was using the whole 26 letters in the latin alphabet? What if it also differentiated between UPPER and lower cases?
Hashing won’t fix sloppy typos/grammar.
How much would hash digsets digests be shortened if the whole alphabel alphabet was used ?
It gets subtle when you consider Unicode. But you said latin alphabet, so you can look at just the UTF-8 section of this table, and assume 1byte = 1letter.
https://github.com/qntm/base32768#base32768
HTH
Yeah you can always take a hex hash output and convert it to Base64…which does conpress it significantly. Apply LZ Compression and boom.
You didn’t convert a hex number into Base64, you Base64 encoded the hex string.
TL;DR, you used the wrong tool.
So, hexadecimal uses 16 characters. Each character stores 4 bits of data (2⁴ = 16).
If you use the 10 digits and 26 letters of the Latin alphabet, the resulting encoding is called Base36.
It is a rather impractical format for storing data, though, because for purposes of simple conversion, the number of possibilities should be a power of 2 – that way a program can do (quick) bit shifts instead of (difficult, especially on big numbers) division to determine which character to use. That’s why it’s mostly used to encode numbers, and not large sequences of data.
Base32 is a slightly-smaller variant that can fit 5 bits of data into one character. (2⁵ = 32)
If you add up digits, uppercase and lowercase characters together (differentiating between upper and lower case), you get 62. This is also an impractical number for computer purposes. But add two extra characters and you get 64, which is another nice power of two (2⁶ = 64), letting one character store 6 bits. And Base64 is a common encoding scheme for data.
And when you know how many bits a character can fit, you can calculate how “efficient” the encoding will be and how many characters will be needed to store data. A Base32 encoding will need 20% fewer characters than hexadecimal, and Base64 needs 33.3% fewer.
You could try base64 maybe? The above would be: Z3nFNDK4ut8Em7nYkkpXhd2IckM= (28 chrs)
base64 uses A-Z, a-z, 0-9, and the + and / characters to encode 6 bits per character. That means you can encode every 3 bytes (or 6 hex) in 4 characters (since 3 * 8 bits = 4 * 6 bits). If the data are not a perfect multiple of 3 bytes, the last group of 4 characters gets padded out with = signs.