I would like to have a way to validate / authenticate a field in a DB.
I have an SQL database where one of the tables has some payment data (most importantly - a USERID, a DATE and a SUM). I would like to make sure the data hasn't been altered by a hacker or any other way - so in fact the triplet of (userid, data, sum) hasn't been altered by an unauthorized intruder.
My idea was to create a hash field - with those 3 fields + a secret token + a random nonce for each row. Then I'll be able to validate the signature with my secret token.
Does this even make sense? Is there a better way to do this?
Thanks