Integer UDFs
Integer UDFs in Trino
This section provides a list of the integer UDFs for the protect, unprotect, and reprotect operations.
ptyProtectInt()
This UDF protects the Int value.
Signature:
ptyProtectInt(Int input, varchar dataElement)
Parameters:
| Name | Type | Description |
|---|---|---|
input | Int | Specifies the data to protect. |
dataElement | VarChar | Specifies the name of the data element to protect the data. |
Returns:
This UDF returns the protected Int value.
Example:
select ptyProtectInt(1234567, 'Int_DE');
Supported Protection Methods:
| Function Name | Tokenization | Encryption | FPE | No Encryption | Masking | Monitoring |
|---|---|---|---|---|---|---|
| ptyProtectInt() | Integer - 4 bytes | No | No | Yes | No | Yes |
ptyUnprotectInt()
This UDF unprotects the protected Int value.
Signature:
ptyUnprotectInt(int input, varchar dataElement)
Parameters:
| Name | Type | Description |
|---|---|---|
input | Int | Specifies the protected data to unprotect. |
dataElement | VarChar | Specifies the name of the data element to unprotect the data. |
Returns:
This UDF returns the unprotected Int value.
Example:
select ptyUnprotectInt(ptyProtectInt(1234567, 'Int_DE'), 'Int_DE');
Supported Protection Methods:
| Function Name | Tokenization | Encryption | FPE | No Encryption | Masking | Monitoring |
|---|---|---|---|---|---|---|
| ptyUnprotectInt() | Integer - 4 bytes | No | No | Yes | No | Yes |
ptyReprotect() - Int
This UDF reprotects the Int format protected data, which was earlier protected using the ptyProtectInt UDF, with a different data element.
Signature:
ptyReprotect(int input, varchar oldDataElement, varchar newDataElement)
Parameters:
| Name | Type | Description |
|---|---|---|
input | Int | Specifies the Int value to reprotect. |
oldDataElement | VarChar | Specifies the name of the data element that was initially used to protect the data. |
newDataElement | VarChar | Specifies the name of the new data element to reprotect the data. |
Returns:
This UDF returns the protected Int value.
Example:
select ptyReprotect(ptyProtectInt(1234567, 'Token_Integer'), 'Token_Integer','new_Token_Integer');
Supported Protection Methods:
| Function Name | Tokenization | Encryption | FPE | No Encryption | Masking | Monitoring |
|---|---|---|---|---|---|---|
| ptyReprotect() | Integer - 4 bytes | No | No | Yes | No | Yes |
Feedback
Was this page helpful?