Insert No-Encryption, Token, and FPE UDFs
These UDFs are used with Tokenization, Format Preserving Encryption (FPE) and, No Encryption data elements.
pty.ins_char
This UDF protects the CHAR data with tokenization and No Encryption data elements.
Note: This UDF supports masking.
Signature:
pty.ins_char (dataelement CHAR, inval CHAR, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | CHAR | Specifies the input 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 UDF returns the protected value as the CHAR data type.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.ins_char('DE_CHAR', 'Original data', 0) "Test of INSERT CHAR func" from dual;
pty.ins_varchar2
This UDF protects the VARCHAR data with tokenization and No Encryption data elements.
Note: This UDF supports masking.
CAUTION: For Date type of data elements, the
pty.ins_varchar2UDF returns an invalid date format error if the input value falls between the non-existent date range from 05-OCT-1582 to 14-OCT-1582 of the Gregorian Calendar. For more information about the tokenization and de-tokenization of the cutover dates of the Proleptic Gregorian Calendar, refer to the section Date Tokenization for cutover Dates of the Proleptic Gregorian Calendar in Protection Methods Reference.
Signature:
pty.ins_varchar2 (dataelement CHAR, inval VARCHAR2, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | VARCHAR2 | Specifies the input 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 UDF returns the protected value as the VARCHAR2 data type.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.ins_varchar2('DE_VARCHAR2', 'Original data', 0) "Test of INSERT VARCHAR2 func" from dual;
pty.ins_unicodenvarchar2
This UDF encrypts data with a data element.
Note: This UDF does not support masking.
Signature:
pty.ins_unicodenvarchar2 (dataelement CHAR, inval CHAR, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | CHAR | Specifies the input 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 UDF returns the protected value as the NVARCHAR2 datatype.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message that explains what went wrong.
>Note: Ensure to use the supported data element only. Using an unsupported data element might result in successful protection without returning any error, but corruption of data can occur.
Example:
select pty.ins_unicodenvarchar2('fpe_unicode', 'Original data', 0) "Test of INSERT encrypt func" from dual;
pty.ins_unicodevarchar2_tok
This UDF protects the VARCHAR2 data with a Unicode Gen2 data element.
Note: This UDF does not support masking.
Signature:
pty.ins_unicodevarchar2_tok(dataelement IN CHAR, inval IN VARCHAR2, SCID IN BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | VARCHAR2 | Specifies the input 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 UDF returns the protected value as the VARCHAR2 datatype.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message that explains what went wrong.
>Note: Ensure to use the supported data element only. Using an unsupported data element might result in successful protection without returning any error, but corruption of data can occur.
Example for Unicode Gen2:
```
select pty.ins_unicodevarchar2_tok('TE_UG2_UTF16LE_LL1AN_SLT13_L2R0_ASTYES',N'xyzÀÁÂÃÄÅÆÇÈÉÊ',0) from dual;
```
```
select pty.ins_unicodevarchar2_tok('TE_UG2_SLTX1_L2R2_N_IPA_Greek_Coptic_UTF16LE',N'ϠϡϢϣϥϦ',0) from dual;
```
pty.ins_unicodenvarchar2_tok
This UDF protects the NVARCHAR2 data with a Unicode Gen2 data element.
Note: This UDF does not support masking.
Signature:
pty.ins_unicodenvarchar2_tok(dataelement IN CHAR, inval IN NVARCHAR2, SCID IN BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | NVARCHAR2 | Specifies the input 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 UDF returns the protected value as the NVARCHAR2 data type.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message that explains what went wrong.
>Note: Ensure to use the supported data element only. Using an unsupported data element might result in successful protection without returning any error, but corruption of data can occur.
Example for Unicode Gen2:select pty.ins_unicodenvarchar2_tok('TE_UG2_UTF16LE_LL1AN_SLT13_L2R0_ASTYES',N'xyzÀÁÂÃÄÅÆÇÈÉÊ',0) from dual;
```
select pty.ins_unicodenvarchar2_tok('TE_UG2_SLTX1_L2R2_N_IPA_Greek_Coptic_UTF16LE',N'ϠϡϢϣϥϦ',0) from dual;
```
pty.ins_date
This UDF protects the DATE data with a tokenization and No Encryption data element.
Signature:
pty.ins_date (dataelement CHAR, inval DATE, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | DATE | Specifies the input 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 UDF returns the unprotected DATE value, when No Encryption data element is used.
- This UDF returns the protected DATE value, when a tokenization data element is used and if the data element date format and the
NLS_DATE_FORMATenvironment variable for an Oracle session is the same as mentioned in the note above.
Exception:
- No Encryption Date Element: If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
- Tokenization Date Element: Tokenization fails and the UDF terminates with an error message explaining what went wrong.
Example for No Encryption:
select PTY.ins_date('DE_NoEnc', '10-23-2014', 0) "Test of INSERT DATE func" from dual;
Example for Tokenization:
select PTY.ins_date('DE_DATE', '10-23-2014', 0) "Test of INSERT DATE func" from dual;
pty.ins_integer
This UDF protects the INTEGER data with a tokenization and No Encryption data element.
Signature:
pty.ins_integer(dataelement CHAR, inval INTEGER, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | INTEGER | Specifies the input 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 UDF returns the protected value as the INTEGER datatype.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
Example:
select PTY.ins_integer('DE_Integer', 12345, 0) "Test of INSERT INT func" from dual;
pty.ins_real
This UDF protects the REAL data with a No Encryption data element.
Note: Data corruption occurs when the input length exceeds 10 decimal digits in the
REALdatatype.
Signature:
pty.ins_real(dataelement CHAR, inval REAL, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | REAL | Specifies the input 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 UDF returns the unprotected value as the REAL datatype.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
>Note: Ensure to use the supported data element only. If an unsupported data element is passed, then the UDF returns the following error:character to number conversion error
Example:
select PTY.ins_real('DE_NoEnc', 1234.1234, 0) "Test of INSERT REAL func" from dual;
pty.ins_float
This UDF protects the FLOAT data with a No Encryption data element.
Signature:
pty.ins_float (dataelement CHAR, inval FLOAT, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | FLOAT | Specifies the input 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 UDF returns the unprotected value as the FLOAT datatype.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
>Note: Ensure to use the supported data element only. If an unsupported data element is passed, then the UDF returns the following error:character to number conversion error
Example:
select PTY.ins_float('DE_NoEnc', 1234.1234, 0) "Test of INSERT FLOAT func" from dual;
pty.ins_number
This UDF protects the NUMBER data with tokenization and No Encryption data elements.
Note: Data corruption occurs when the input length exceeds 10 decimal digits in the
NUMBERdatatype.
Signature:
pty.ins_number (dataelement CHAR, inval NUMBER, scid BINARY_INTEGER)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | NUMBER | Specifies the input 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 UDF returns the unprotected value as the NUMBER datatype.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
>Note: Ensure to use the supported data element only. If an unsupported data element is passed, then the UDF returns the following error:character to number conversion error
Example:
select PTY.ins_number('DE_Integer', 12345, 0) "Test of INSERT NUMBER func" from dual;
pty.ins_raw
This UDF protects the RAW data with a No Encryption data element.
Signature:
pty.ins_raw (dataelement CHAR, inval RAW, scid BINARY_INTEGER\)
Parameters:
| Name | Type | Description |
|---|---|---|
dataelement | CHAR | Specifies the name of the data element. |
inval | RAW | Specifies the input 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 UDF returns the unprotected value as RAW data.
Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.
>Note: Ensure to use the supported data element only. If an unsupported data element is passed, then the UDF returns the following error:character to number conversion error
Example:
select PTY.ins_raw('DE_NoEnc', 'FFDD12345', 0) "Test of INSERT RAW func" from dual;
Feedback
Was this page helpful?