i have a MD5 hash "dd4f2b2f700cfe4ba70ae84ba26a0e3d" i want to make it shorter.
No online APIs please.
how can I do that?
Thanks
No online APIs please.
how can I do that?
Thanks
Given that MD5 is 128 bits = 32 hexadecimal digits/characters, adding the length seems somewhat redundant."G", then add 32 (the length of the original Md5 string) to it to produce "G32".
i am looking for a way to make this hash shorter so that it can be written down quickly by hand My goal is to get a hash that is 6-8 characters long and then serve as url like: www.myurl.de/10gherkAre you looking for a way to create a shorter checksum to verify the integrity of a larger string?
If you want 7 characters and you use Base64, then that'd be 42 bits, so just swipe the first or last 10 hex characters, convert them to 5 bytes, and then base-64 encode them.i am looking for a way to make this hash shorter so that it can be written down quickly by hand. My goal is to get a hash that is 6-8 characters long and then serve as url like: www.myurl.de/10gherk
i am looking for a way to make this hash shorter so that it can be written down quickly by hand My goal is to get a hash that is 6-8 characters long and then serve as url like: www.myurl.de/10gherk
This is effectively what the hashing does, by hiding the valid shortcode needles randomly about a 42-bit haystack.if security is an issue, then you will need to add a little encryption
But with hashing, you can't reverse the hash back to the shortcode (record) number.This is effectively what the hashing does, by hiding the valid shortcode needles randomly about a 42-bit haystack.
If we have a Map with original URL and shortened URL (hash) then hashing works fine.But with hashing, you can't reverse the hash back to the record number.
And hashes can be reconstructed from the original URL or data; record numbers and other random choices can't.You can just generate a random 5 letters string. It doesn't need to have any relation to the original URL.
Now I gotcha - and just limit the hash method so it doesn't generate a hash of more then 6-8 characters.If we have a Map with original URL and shortened URL (hash) then hashing works fine.