Data Validation
What is Data Validation
In instances where an invalid value is detected during encryption or decryption, it is essential to be replaced with a predefined custom error code.
List of Connectors Supporting Data Validation
Connector | Supported |
FEU | Yes |
Streamset | Yes |
Databricks | Yes |
Algorithm Supporting Data Validation
Algorithm Type | Supported |
FPE | Yes |
List of Datatype Supporting Data Validation
Format Type | Supported |
EMAIL | Yes |
SSN | Yes |
CC | Yes |
IP | Yes |
Date | Yes |
DATE_DD_MM | Yes |
Numeric | Yes |
How to Enable Data Validation
To enable or disable Data Validation, follow these steps:
-
In the Privacera Portal, navigate to Encryption & Masking.
-
Select an existing scheme or create a new one.
-
Use the toggle labeled Data Validation to enable or disable the feature.
Data validation can be enabled or disabled at the scheme level. This setting can be modified even after the scheme has been created.
Custom Error Code Table Glossary
ERROR_CODE | Actual Message |
PRIV_PEG_ENC_ERROR | Default message for Privacera PEG Error |
PRIV_PEG_ENC_ERROR_1 | Invalid SSN format. Ensure correct SSN format in data |
PRIV_PEG_ENC_ERROR_2 | Invalid credit card format. Ensure correct credit card format in data |
PRIV_PEG_ENC_ERROR_3 | Incorrect IP address format. Ensure correct IP address format in data |
PRIV_PEG_ENC_ERROR_4 | Date format cannot be parsed. Please enter the date in one of the supported formats |
PRIV_PEG_ENC_ERROR_5 | Invalid email format. Ensure correct email format in data |
PRIV_PEG_ENC_ERROR_6 | The value was skipped because it contained a Privacera error code |
PRIV_PEG_ENC_ERROR_7 | The FPE algorithm cannot encrypt the data , because the length of X is not within the permitted range |
PRIV_PEG_ENC_ERROR_8 | The AlphaNumeric algorithm cannot encrypt the data , because the length of X is not within the permitted range |
PRIV_PEG_ENC_ERROR_9 | The input value does not match with charset of the algorithm |
PRIV_PEG_ENC_ERROR_10 | The input contains values that include non-numeric characters, Please ensure that all values consist of numbers only |
Sample Results
Protect/ Unprotect | Input | Response |
Protect | 567-89-7789a | PRIV_PEG_ENC_ERROR_1 |
Protect | 489-36-8350 | 027-29-0768 |
Unprotect | PRIV_PEG_ENC_ERROR_1 | PRIV_PEG_ENC_ERROR_1 |
Unprotect | 027-29-0768 | 489-36-8350 |
Protect/ Unprotect | Input | Response |
Protect | 567-89-7789a | PRIV_PEG_ENC_ERROR_2 |
Protect | 4929-3813-3266-4295 | 8337-5877-2815-5333 |
Unprotect | PRIV_PEG_ENC_ERROR_2 | PRIV_PEG_ENC_ERROR_2 |
Unprotect | 8337-5877-2815-5333 | 4929-3813-3266-4295 |
Protect/ Unprotect | Input | Response |
Protect | 123a@ | PRIV_PEG_ENC_ERROR_3 |
Protect | 192.168.1.1 | 63.226.6.150 |
Unprotect | PRIV_PEG_ENC_ERROR_3 | PRIV_PEG_ENC_ERROR_3 |
Unprotect | 63.226.6.150 | 192.168.1.1 |
Protect/ Unprotect | Input | Response |
Protect | 123 | PRIV_PEG_ENC_ERROR_4 |
Protect | 26/12/2012 | 16/04/2036 |
Unprotect | PRIV_PEG_ENC_ERROR_4 | PRIV_PEG_ENC_ERROR_4 |
Unprotect | 16/04/2036 | 26/12/2012 |
Protect/ Unprotect | Input | Response |
Protect | 123 | PRIV_PEG_ENC_ERROR_4 |
Protect | 06/13/2012 | 01/27/2979 |
Protect | PRIV_PEG_ENC_ERROR_4 | PRIV_PEG_ENC_ERROR_4 |
Protect | 01/27/2979 | 06/13/2012 |
Protect/ Unprotect | Input | Response |
Protect | gmail | PRIV_PEG_ENC_ERROR_5 |
Protect | tom@gmail.com | Yum@pCaPd.dE |
Unprotect | PRIV_PEG_ENC_ERROR_5 | PRIV_PEG_ENC_ERROR_5 |
Unprotect | Yum@pCaPd.dE | tom@gmail.com |
Protect/ Unprotect | Input | Response |
Protect | 12345a | PRIV_PEG_ENC_ERROR_10 |
Protect | 12345 | 35755 |
Unprotect | PRIV_PEG_ENC_ERROR_10 | PRIV_PEG_ENC_ERROR_10 |
Unprotect | 35755 | 12345 |
Format Type : TEXT , Algorithm : FPE , Data Validation is enabled
Protect/ Unprotect | Input | Response |
Protect | a | PRIV_PEG_ENC_ERROR_7 |
Protect | äää | PRIV_PEG_ENC_ERROR_9 |
Protect | aä | PRIV_PEG_ENC_ERROR_7 |
Protect | blueberry | StgoHAGQf |
Unprotect | PRIV_PEG_ENC_ERROR_7 | PRIV_PEG_ENC_ERROR_7 |
Unprotect | PRIV_PEG_ENC_ERROR_9 | PRIV_PEG_ENC_ERROR_9 |
Unprotect | StgoHAGQf | blueberry |
Format Type : TEXT , Algorithm : Alphanumeric , Data Validation is enabled
Protect/ Unprotect | Input | Response |
Protect | a | PRIV_PEG_ENC_ERROR_8 |
Protect | äää | PRIV_PEG_ENC_ERROR_9 |
Protect | aä | PRIV_PEG_ENC_ERROR_8 |
Protect | blueberry | A86O4uYI9 |
Unprotect | PRIV_PEG_ENC_ERROR_8 | PRIV_PEG_ENC_ERROR_8 |
Unprotect | PRIV_PEG_ENC_ERROR_9 | PRIV_PEG_ENC_ERROR_9 |
Unprotect | A86O4uYI9 | blueberry |
When data validation is disabled and the option to ignore invalid values is set to true, invalid values will be replaced with either the ORIGINAL or EMPTY value, depending on the specified property setting.
PEG_V2_NATIVE_FPE_INVALID_VALUE_IGNORE=true PEG_V2_NATIVE_FPE_INVALID_VALUE_REPLACE=ORIGINAL/EMPTY
When data validation is disabled and the option to ignore invalid values is set to false, any invalid values will be disregarded, and the original value will be retained.
PEG_V2_NATIVE_FPE_INVALID_VALUE_IGNORE=false