Hashing Functions and Examples

Hashing functions take the same parameters and return a hash value.

Hashing is accomplished by two functions of the protector, an Insert hash function and an Update hash function. Both functions take the same parameters and return a hash value that is always a 160 bit (SHA1) or a 256 bit (SHA256) binary value. The difference between the functions is the access rights that they check.

Here is the functions syntax example, applicable to an Oracle database:

FUNCTION ins_hash_varchar2(dataelement IN CHAR, cdata IN VARCHAR, SCID IN BINARY_INTEGER) RETURN RAW;
FUNCTION upd_hash_varchar2(dataelement IN CHAR, cdata IN VARCHAR, SCID IN BINARY_INTEGER) RETURN RAW;

Table: Functions Syntax Example

Where…Is…
dataelementThe data element name.
cdataThe data.
SCIDThe security ID.
Not used parameter. It is kept in signature due to backwards compatibility reasons.

There is no decrypt function since a hash is a checksum and not data.


Hash Data column size

Hash Data column size explains and provides an example of data with hash value.

Using Hashing Triggers and View

Hashing Triggers use protection functions in triggers in the same manner as encryption.


Last modified : December 16, 2025