Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top