Other Uses of Hashing
Hashing has many uses beyond cryptography—for example, in web programming and virus detection .
Web applications are stateless: they do not keep the connection open to the database server for the duration of the transaction. In other words, there is no concept of a “session,” and therefore there is no locking of the type Oracle users rely upon. This means that there is no easy way to find out whether data on a web page has changed. But if a hash value is stored along with the data, a new hash value can be recalculated and compared with the stored value. If the two values do not agree, the data has changed.
Hashing is also helpful in determining whether data can be trusted. Consider the case of a virus that updates critical documents stored inside the database. This is not something that can be easily caught by a trigger. However, if the document contains a hash value, then by comparing a computed hash value with the stored value, you can determine whether the document has been tampered with and you will know whether you can trust that document.