35.6 MD5_CHECKSUM Function
Use this function for lost update detection. Lost update detection ensures data integrity in applications where data can be accessed concurrently.
This function produces hidden form fields with a name attribute equal to fcs
and as value a MD5 checksum based on up to 50 inputs. APEX_ITEM.MD5_CHECKSUM also produces an MD5 checksum using Oracle Database DBMS_CRYPTO:
DBMS_CRYPTO.HASH (
SRC => UTL_RAW.CAST_TO_RAW('my_string'),
TYP => DBMS_CRYPTO.HASH_MD5 );
An MD5 checksum provides data integrity through hashing and sequencing to ensure that data is not altered or stolen as it is transmitted over a network.
Syntax
APEX_ITEM.MD5_CHECKSUM (
p_value01 IN VARCHAR2 DEFAULT NULL,
p_value02 IN VARCHAR2 DEFAULT NULL,
p_value03 IN VARCHAR2 DEFAULT NULL,
...
p_value50 IN VARCHAR2 DEFAULT NULL,
p_col_sep IN VARCHAR2 DEFAULT '|',
p_item_id IN VARCHAR2 DEFAULT NULL )
RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
|
Fifty available inputs. If no parameters are supplied, defaults to NULL. |
p_col_sep |
String used to separate p_value inputs. Defaults to | (pipe symbol).
|
p_item_id |
ID of the HTML form item. |
Example
This function generates hidden form elements with the name fcs
. The values can subsequently be accessed by using the APEX_APPLICATION.G_FCS array
.
SELECT APEX_ITEM.MD5_CHECKSUM(ename,job,sal) md5_cks,
ename, job, sal
FROM emp
Parent topic: APEX_ITEM (Legacy)