search cancel

How can we achieve constancy using the FormatEncrypt function


Article ID: 228775


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)


Within our environment, we have had many databases added and assimilated due to several mergers and acquisitions of companies that were in a similar business.
As a result, we often come across the use of different data type for the same field e.g. TIN (tax identification number) for any provider.
Whereas in some places it is defined as VARCHAR2(9-10 digit), in some places it is defined as (NUMBER).
This poses a serious challenge to our data, as our masking does not return consistent results. 

Can you suggest a way this inconsistency be overcome while using FormatEncrypt function?


TDM 4.9
Test Data Manager
Fast Data Masker

Component :


Option one:
for FORMATENCRYPT1 we implemented the new option "Mask as Number" which allows producing the same outputs for numeric and text data types (in particular the same rules for numeric columns - preserving leading zeros and first digit - are applied to text columns).

if you have 123 stored in a numeric column and a text column with the option to mask as a number they will end up with the same mask.

Option two:
use FORMATENCRYPT in SCRAMBLE by using SQLFUNTION to overcome this... which could need some additional operations depending on the data.. i.e. convert, substring etc

Before masking

After executing "SELECT  SCRAMBLE.gtsrc_scramble2('LOB_TABLE2.ID',NULL,16,'Y',rownum,'N',null,'N',null,ID,'FORMATENCRYPT',0,0) ID,
SCRAMBLE.gtsrc_scramble2('LOB_TABLE2.CHAR_COL',NULL,16,'Y',rownum,'N',null,'N',null,CHAR_COL,'FORMATENCRYPT',0,0) CHAR_COL

Additional Information

1) the gtsrc_scramble2 is an additional function that can be created on an oracle scramble database
2) Please see the below documentation:

3) You would need to add the scramble database with this function to your oracle server so the same connection can be used for the masking table as well as to reach this function on the scramble database.
4) You could create a temp database and add the table as in the example provided here.
5) install the scramble database to the same server and grant the user permissions to it.
6) then create the function if you have not already.
7) then run the masking example query.