Question

I need to store data hashes in the database, so that later I know that some data is already present in the database. This is done using the standard digest algorithm with salt, so that these hashes are secure in case of any brute-force attacks.

Now I have a problem that the hashes are really secure, but I cannot anymore identify that some data is already present in the database (since hashes are different for the same data)?

How to identify same data (not the content, only that the data is same), even if using salted digest?

Was it helpful?

Solution

Perform the same data + salt hash operation and compare the result with what's stored in the database. If you don't know the salt, you're SOL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top