Update Encryption UDFs
These UDFs update the data. Protect access is required to use these functions.
Note: These UDFs are marked for deprecation and will be removed from the future releases. Protegrity recommends to use the standard Insert or Protect UDFs.
pty.encUpdate
This procedure updates and encrypts one value of the VARCHAR2 data with one data element for encryption.
Signature:
pty.encUpdate(dataelement VARCHAR2, cdata VARCHAR2, rdata RAW, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | VARCHAR2 | Specifies the name of the data element. |
cdata | VARCHAR2 | Specifies the input data. |
rdata | RAW | Specifies the encrypted output data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the procedure terminates with an error message explaining what went wrong.
Example:
declare
raw_out raw(2000);
begin
dbms_output.put_line('Test of UPDATE multi encryption procedure for 1
COLUMN');
dbms_output.put_line('------------------------------------------------
------');
pty.encUpdate('DE_AES256', 'ASFGFGghg5577fFFyu', raw_out, 0);
DBMS_OUTPUT.PUT_LINE('Encrypted data: ' || raw_out);
end;
pty.upd_encrypt_char
This UDF re-encrypts the CHAR protected data that has been updated, with a data element for encryption.
Signature:
pty.upd_encrypt_char(dataelement CHAR, inval CHAR, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | CHAR | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_char('DE_AES256', 'Original data', 0) "Test of UPDATE enc CHAR func" from dual;
pty.upd_encrypt_varchar2
This UDF re-encrypts the VARCHAR2 data that has been updated, with a data element for encryption.
Signature:
pty.upd_encrypt_varchar2(dataelement CHAR, inval VARCHAR2, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | VARCHAR2 | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_varchar2('DE_AES256', 'Original data', 0) "Test of UPDATE enc VARCHAR2 func" from dual;
pty.upd_encrypt_date
This UDF re-encrypts the DATE data that has been updated, with a data element for encryption.
Note: When you use the
pty.ins_encrypt_dateUDF to protect date, the data is not protected. If you want to protect the Oracle input data typeDATE, you must use the UDFs as described in Oracle Input Data Type to UDF Mapping to identify the appropriate UDF as per your requirement.
Signature:
pty.upd_encrypt_date(dataelement CHAR, inval DATE, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | DATE | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_date('DE_AES256', '23-OCT-14', 0) "Test of UPDATE enc DATE func" from dual;
pty.upd_encrypt_integer
This UDF re-encrypts the INTEGER data that has been updated, with a data element for encryption.
Signature:
pty.upd_encrypt_integer(dataelement CHAR, inval INTEGER, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | INTEGER | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_integer('DE_AES256', 12345, 0) "Test of UPDATE enc INT func" from dual;
pty.upd_encrypt_real
This UDF re-encrypts the REAL data that has been updated, with a data element for encryption.
Signature:
pty.upd_encrypt_real(dataelement CHAR, inval REAL, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | REAL | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_real('DE_AES256', 1234.1234, 0) "Test of UPDATE enc REAL func" from dual;
pty.upd_encrypt_float
This UDF re-encrypts the FLOAT data that has been updated, with a data element for encryption.
Signature:
pty.upd_encrypt_float(dataelement CHAR, inval FLOAT, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | FLOAT | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_float('DE_AES256', 1234.1234, 0) "Test of UPDATE enc FLOAT func" from dual;
pty.upd_encrypt_number
This UDF re-encrypts the NUMBER data that has been updated, with a data element in encryption.
Signature:
pty.upd_encrypt_number(dataelement CHAR, inval NUMBER, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | NUMBER | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_number('DE_AES256', 12345, 0) "Test of UPDATE enc NUMBER func" from dual;
pty.upd_encrypt_raw
This UDF re-encrypts the RAW data that has been updated, with a data element for encryption.
Signature:
pty.upd_encrypt_raw(dataelement CHAR, inval RAW, scid INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | RAW | Specifies the input data. |
scid | INTEGER | Specifies the security co-ordinate ID. Set the value of the parameter to zero. Note: This parameter is no longer used and is retained for compatibility purposes only. |
Returns:
This UDF returns the encrypted value as RAW data.
Exception:
If the user does not have reprotect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.upd_encrypt_raw('DE_AES256', 'FFDD12345', 0) "Test of UPDATE enc RAW func" from dual;
Feedback
Was this page helpful?