Decimal UDFs
This section provides a list of the Decimal UDFs for the protect, unprotect, and reprotect operations. Ensure to use the data element with the No Encryption method only. Using any other data element might cause data corruption.
ptyProtectDecimal()
This UDF protects the Decimal value.
Signature:
ptyProtectDecimal(decimal input, varchar dataElement)
Parameters:
| Name | Type | Description |
|---|---|---|
input | Decimal | Specifies the data to protect. |
dataElement | VarChar | Specifies the name of the data element to protect the data. |
Returns:
This UDF returns the protected Decimal value. If the input value is NULL and the data element is not a part of the policy, then the output value returned is NULL.
Example:
select ptyProtectDecimal(12332212222223.033, 'NoEnc');
Supported Protection Methods:
| Function Name | Tokenization | Encryption | FPE | No Encryption | Masking | Monitoring |
|---|---|---|---|---|---|---|
| ptyProtectDecimal() | No | No | No | Yes | No | Yes |
ptyUnprotectDecimal()
This UDF unprotects the protected Decimal value. Ensure to use the data element with the No Encryption method only. Using any other data element might cause data corruption.
Signature:
ptyUnprotectDecimal(decimal input, varchar dataElement)
Parameters:
| Name | Type | Description |
|---|---|---|
input | Decimal | 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 Decimal value. If the input value is NULL and the data element is not a part of the policy, then the output value returned is NULL.
Example:
select ptyUnprotectDecimal(12332212222223.033, 'NoEnc');
Supported Protection Methods:
| Function Name | Tokenization | Encryption | FPE | No Encryption | Masking | Monitoring |
|---|---|---|---|---|---|---|
| ptyUnprotectDecimal() | No | No | No | Yes | No | Yes |
ptyReprotect() - Decimal
This UDF reprotects the Decimal format protected data, which was earlier protected using the ptyProtectDecimal() UDF, with a different data element.
Signature:
ptyReprotect(decimal input, varchar oldDataElement, varchar newDataElement)
Parameters:
| Name | Type | Description |
|---|---|---|
input | Decimal | Specifies the Decimal 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 Decimal value.
Example:
select ptyReprotect(12332212222223.033,'NoEnc','NoEnc');
Supported Protection Methods:
| Function Name | Tokenization | Encryption | FPE | No Encryption | Masking | Monitoring |
|---|---|---|---|---|---|---|
| ptyReprotect() - Decimal | No | No | No | Yes | No | Yes |
Feedback
Was this page helpful?