4 ms·
> Your client then takes the string, and decodes it into an image that it shows while the real image is loading over the network. That's not a "hash", that's a
by tantalor 7y ago
> Your client then takes the string, and decodes it into an image that it shows while the real image is loading over the network.
That's not a "hash", that's an encoding. Hashes are one-way.
- bootloop 7y agoCan you show me then how you decode this string to the original image?
- lvh 7y agoThis /is/ one-way by virtue of throwing information away: you can't rebuild the original image. If you're thinking of preimage resistance (it must be hard to find an input that hashes to a given output) that's a property of cryptographic hashes, but not hashes in general (canonical example FNV).
- dahart 7y agoA hash is any function that produces a fixed size output. It’s not required to be one-way, or to even change the input. You might be thinking of a “good cryptographic” hash. For that, it’s desirable to be one-way and to scramble the input, but that’s a specific subset of hash functions. Edit: to the downvoter, please have a look through https://en.wikipedia.org/wiki/Hash_function https://en.wikipedia.org/wiki/Hash_function