2 ms·
They're not using a hash function: https://en.wikipedia.org/wiki/Format-preserving_encryption https://en.wikipedia.org/wiki/Format-preserving_encryption
by bouk 6y ago
They're not using a hash function: https://en.wikipedia.org/wiki/Format-preserving_encryption https://en.wikipedia.org/wiki/Format-preserving_encryption
- gopalv 6y agoThere are reversible bit hash functions too. I've used twang's 64 bit mix in places where the domain is just as big as the hash space - 64 bit to 8 byte hash to 12 byte Y64 strings. That said, the results are almost always ugly, if I had to do it again, I'd do it the way gfycat does (adjective, adjective, animal).
- bouk 6y agoThanks for pointing me to the concept of bit mix functions, very interesting.