Multiple Update Encryption Procedures
These procedures encrypt one to four values of data with one procedure call. The user must be granted Protect access for the data element that will be used to execute these procedures. You can use the upd_check procedure to check whether the user has Protect access.
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 BINARY_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 | BINARY_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 procedure returns the encrypted value as RAW data.
Exception:
If you configure an exception in the policy and the user does not have Protect 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_encryptx2
This procedure updates and encrypts two values of VARCHAR2 data with two data elements for encryption.
Signature:
pty.upd_encryptx2(dataelement1 VARCHAR2, cdata1 VARCHAR2, rdata1 RAW, scid1 BINARY_INTEGER, dataelement2 VARCHAR2, cdata2 VARCHAR2, rdata2 RAW, scid2 BINARY_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 | BINARY_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. |
dataelement2 | VARCHAR2 | Speicifies the name of the data element. |
cdata2 | VARCHAR2 | Specifies the input data. |
rdata2 | RAW | Specifies the encrypted output data. |
scid2 | BINARY_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 procedure returns the encrypted value as RAW data.
Exception:
If you configure an exception in the policy and the user does not have Protect access rights in the policy, then the procedure terminates with an error message explaining what went wrong.
Example:
begin
dbms_output.put_line('Test of UPDATE multi encryption procedure for 2
COLUMNS');
dbms_output.put_line('------------------------------------------------
-------');
pty.upd_encryptx2('DE_AES256', 'ASFGFGghg5577fFFyu', raw_out1, 0,
'DE_AES256', 'IyutGGg76hg8h1', raw_out2, 0);
DBMS_OUTPUT.PUT_LINE('Encrypted data1: ' || raw_out1);
DBMS_OUTPUT.PUT_LINE('Encrypted data2: ' || raw_out2);
end;
pty.upd_encryptx3
This procedure updates and encrypts three values of VARCHAR2 data with three data elements for encryption.
Signature:
pty.upd_encryptx3 (dataelement1 VARCHAR2, cdata1 VARCHAR2, rdata1 RAW, scid1 BINARY_INTEGER, dataelement2 VARCHAR2, cdata2 VARCHAR2, rdata2 RAW, scid2 BINARY_INTEGER, dataelement3 VARCHAR2, cdata3 VARCHAR2, rdata3 RAW, scid3 BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement1 | VARCHAR2 | Specifies the name of the data element. |
cdata1 | VARCHAR2 | Specifies the input data |
rdata1 | RAW | Specifies the encrypted output data |
scid1 | BINARY_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. |
dataelement2 | VARCHAR2 | Specifies the name of the data element. |
cdata2 | VARCHAR2 | Specifies the input data |
rdata2 | RAW | Specifies the encrypted output data |
scid2 | BINARY_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. |
dataelement3 | VARCHAR2 | Specifies the name of the data element. |
cdata3 | VARCHAR2 | Specifies the input data |
rdata3 | RAW | Specifies the encrypted output data |
scid3 | BINARY_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 procedure returns the encrypted value as RAW data.
Exception:
If you configure an exception in the policy and the user does not have Protect access rights in the policy, then the procedure terminates with an error message explaining what went wrong.
Example:
begin
dbms_output.put_line('Test of UPDATE multi encryption procedure for 3
COLUMNS');
dbms_output.put_line('-----------------------------------------------
--------');
pty.upd_encryptx3('DE_AES256', 'ASFGFGghg5577fFFyu', raw_out1, 0,
'DE_AES256', 'IyutGGg76hg8h1', raw_out2, 0, 'DE_AES256', 'AAaazzZZ1199',
raw_out3, 0);
DBMS_OUTPUT.PUT_LINE('Encrypted data1: ' || raw_out1);
DBMS_OUTPUT.PUT_LINE('Encrypted data2: ' || raw_out2);
DBMS_OUTPUT.PUT_LINE('Encrypted data3: ' || raw_out3);
end;
pty.upd_encryptx4
This procedure updates and encrypts four values of VARCHAR2 data with four data elements for encryption.
Signature:
pty.upd_encryptx4 (dataelement1 VARCHAR2, cdata1 VARCHAR2, rdata1 RAW, scid1 BINARY_INTEGER, dataelement2 VARCHAR2, cdata2 VARCHAR2, rdata2 RAW, scid2 BINARY_INTEGER, dataelement3 VARCHAR2, cdata3 VARCHAR2, rdata3 RAW, scid3 BINARY_INTEGER, dataelement4 VARCHAR2, cdata4 VARCHAR2, rdata4 RAW, scid4 BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement1 | VARCHAR2 | Specifies the name of the data element. |
cdata1 | VARCHAR2 | Specifies the input data |
rdata1 | RAW | Specifies the encrypted output data |
scid1 | BINARY_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. |
dataelement2 | VARCHAR2 | Specifies the name of the data element. |
cdata2 | VARCHAR2 | Specifies the input data |
rdata2 | RAW | Specifies the encrypted output data |
scid2 | BINARY_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. |
dataelement3 | VARCHAR2 | Specifies the name of the data element. |
cdata3 | VARCHAR2 | Specifies the input data |
rdata3 | RAW | Specifies the encrypted output data |
scid3 | BINARY_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. |
dataelement4 | VARCHAR2 | Specifies the name of the data element. |
cdata4 | VARCHAR2 | Specifies the input data. |
rdata4 | RAW | Specifies the encrypted output data. |
scid4 | BINARY_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 procedure returns the encrypted value as RAW data.
Exception:
If you configure an exception in the policy and the user does not have Protect access rights in the policy, then the procedure terminates with an error message explaining what went wrong.
Example:
begin
dbms_output.put_line('Test of UPDATE multi encryption procedure for 4
COLUMNS');
dbms_output.put_line('------------------------------------------------
-------');
pty.upd_encryptx4('DE_AES256', 'ASFGFGghg5577fFFyu', raw_out1, 0,
'DE_AES256', 'IyutGGg76hg8h1', raw_out2, 0, 'DE_AES256', 'AAaazzZZ1199',
raw_out3, 0 , 'DE_AES256', ' ASFGFGghg5577fFFyu; AblnQEWsw0129NGku;
BINKUcrc8749lLLnx; CAESYwiw0098mMMns; FEORLkjk2323kKKmn;
LAENILmcm6677kBBop; MOIRNAzlz9876lMMyu; MUBMIARAR6087kUUmn;
NIASAlziz2398hTTuv; PATRHXuru9898hFFns; ROYNESgog7802gMMus;
SIRSHAuna9049kKKjn; TOTALSlol7843mWWqa; TUSFAVopo8080tTTnx;
TUHSRAknk8108mKKdw; VAENSAJJBJ6712fFFGH; VEPSIMdsd9898kSDnm;
URDPLAghg7676LLyu; UNBAKERkik2233lLLmu; YANMRAlsl9090fFFyu;
YASTURhom0123hHHmn; XAOILDghg0987fFFmn; ZABCDEmom5577bHHyy;
ZOHRASghg5297nNNcd ', raw_out4, 0);
DBMS_OUTPUT.PUT_LINE('Encrypted data1: ' || raw_out1);
DBMS_OUTPUT.PUT_LINE('Encrypted data2: ' || raw_out2);
DBMS_OUTPUT.PUT_LINE('Encrypted data3: ' || raw_out3);
DBMS_OUTPUT.PUT_LINE('Encrypted data4: ' || raw_out4);
end;
Feedback
Was this page helpful?