I am developing a table that will be used to store information about which customers will be charged.The problem is that the database may reside on client servers.I was thinking of adding a second table containing the hash of the first, so that the software using the database can update the database and the hash, but clients cannot edit (without our knowledge) a table containing paid information (for which they cannot generate the correct hash).
Is this a good way to stop customers faking a table that they have access to?How to create a hash of all data in a table (possibly more than one table)?
In particular, I would need the hash data in the table instead of an object such as a dataset (i.e. I don't want all the hashes to change if we change the components).
I was considering writing data to a text file and creating a file hash, but that would be painfully slow since the table could contain up to 500,000 records and the hash had to be generated with every update!
The implementation for this can be both in delphi and in C #.
Why not just a write-based hash, not a table hash?
, 64 ( ), 64 - :
recordid tableid hash
- .
, ( , delphi)
, , . -, , . GUID , , . , , , , , . , .
:
Hash([Table Data] + [Secret Value]) = [stored hash]
, , , .
, , . , 10 , , , , . , , , . . , , . , .
, :
, , , (.. .) , , . , , . , .
, , , . SQL Server:
http://msdn.microsoft.com/en-us/library/ms179331.aspx
, , , - . , , , , . , , .
.Net http://msdn.microsoft.com/en-us/magazine/cc164058.aspx , .
, (, , - , , , ),
, Hash(concat(M,N), seed) == Hash(N,Hash(M,seed))
Hash(concat(M,N), seed) == Hash(N,Hash(M,seed))
SQL ,
#.
, , - . " " . , barf stop. . , , .
, , - , . .
, . , ( ). , , , "", , .
Source: https://habr.com/ru/post/1734922/More articles:Audio Delay OpenAL or RemoteIO Audio Unit - iphoneDistance (feet, inches) class or structure - c #Overriding common methods with custom implementations - javaWhat is the most elegant way to work with source files that are source (relative) source files in VIM? - vimC ++ d3d hooking - COM vtable - c ++list and explosion - arraysJQuery-selector-like regex - javascriptMATLAB merges edge region back into image - matlabะัะทะพะฒ jQuery ะธะท ColdFusion - jqueryRunning a batch file on a remote computer from a hudson server using PSEXEC - continuous-integrationAll Articles