How do I generate 6 or 8 digits hash from a string and decode it back??
-
Hello, I need to encode a string to a 6 or 8 digits hash and decode it to original string. Encoded string has to include only numbers and alphabetic characters. Thanks.
My understanding is that the whole point of a hash is that it cannot be decoded back to the original string - let's see if I am proven wrong on this.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
My understanding is that the whole point of a hash is that it cannot be decoded back to the original string - let's see if I am proven wrong on this.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
Hello, I need to encode a string to a 6 or 8 digits hash and decode it to original string. Encoded string has to include only numbers and alphabetic characters. Thanks.
Come on! You want to convert *any* string and reduce it to 6 or 8 digits, and then be able to convert it back again? Well, if you find a way I'll be impressed. Not to mention that we'll be able to zip anything up in just 6 digits..!
Regards, Rob Philpott.
-
Hello, I need to encode a string to a 6 or 8 digits hash and decode it to original string. Encoded string has to include only numbers and alphabetic characters. Thanks.
Maybe someone can help you when you explain What it is that are trying to achieve? Why do you need to generate the 'hash' and translate it back?
-
It can be hash or something like that, I need to convert a 12 characters long string to 12 characters long string or smaller meaningless one. Thanks for your reply.
In which case just use some sort of algorithm that is applied to the ascii value of the first character, then use the output from this together with the value of the second character to convert the second character and so on(this way it is a little bit harder to crack the sequence of characters). To decode it all you need to do is reverse the process starting from the first character again.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
Maybe someone can help you when you explain What it is that are trying to achieve? Why do you need to generate the 'hash' and translate it back?
-
I need to generate a meaningless code that includes last 4 characters of MAC address and a date for example; F28D31122014. Thanks.
Creating a meaningless code is easy, but it is impossible to regenerate a MAC address from only the last 4 characters. Still don't understand WHY. WHAT are you trying to accomplish?
-
Hello, I need to encode a string to a 6 or 8 digits hash and decode it to original string. Encoded string has to include only numbers and alphabetic characters. Thanks.
candogu wrote:
I need to encode a string to a 6 or 8 digits hash and decode it to original string
That is not possible. And it is proven as well. Now if you want to take a string or binary data and create another string which will only contain alphanumerics then that is fairly easy. In most cases the second string will be longer than the first. You can look to Base64 encoding to see an example of how you might do this. (Base64 is similar to but not exactly the same as what the output you are asking for is.)
-
Come on! You want to convert *any* string and reduce it to 6 or 8 digits, and then be able to convert it back again? Well, if you find a way I'll be impressed. Not to mention that we'll be able to zip anything up in just 6 digits..!
Regards, Rob Philpott.
Rob Philpott wrote:
we'll be able to zip anything up in just 6 digits..
That would be an incredible compression ratio if one could achieve that :-D
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak