Oct. 10th, 2016

To all IBM Optim software users, who use this toolsuite to perform data masking/redaction.
In case that you need to use the Format-Preserving Enctyption (FPE) algorithm with non-Latin characters (and non-numbers):

(a) This can be performed with the help of a custom exit, and by passing the parameter LANGUAGE="ioqx0MyExitName" (as described in the official documentation).

(b) In order to write this magical exit, you would need a sample, which is provided as part of the fresh distribution of Optim Data Masking on Demand (Optim DMoD) product, in the samples/ODPP_AFFLANGEXIT subdirectory.
Technically the exit is fairly straightforward: its entry procedure is called two times:
 - first, to determine the number of character classes and the width of each character class (in utf-32 code points), and
 - second, to fill the character class arrays with their characters.
Each character in each of the classes will be replaced by another (most of the times) character of the same class (e.g. latin letters with other latin letters, numbers with numbers, and russian letters - with russian letters). All other characters in the input string will remain untouched.

(c) To mask unicode characters with the custom exit (for example, fields of NVARCHAR in Microsoft SQL Server), use the following syntax:
TRANS PRO=AFF, MTD=REP, ALGO=FPE, KEY="key1", LANGUAGE="ioqx0MyExit", TWEAKS=NO, FLDDEF1=(NAME=FieldName, dt=WVARCHAR)

(d) To successfully mask the characters taken from a non-Unicode database (for example, VARCHAR fields of Microsoft SQL Server), use the following syntax:
TRANS PRO=AFF, MTD=REP, ALGO=FPE, KEY="key1", LANGUAGE="ioqx0MyExit", TWEAKS=NO, FLDDEF1=(NAME=FieldName, dt=VARCHAR, codepage=1251)
The codepage sub-parameter is absolutely critical here, because by default the Affinity Provider expects its input to come in UTF-8 (which will make the masking to fail).

Profile

zinal: (Default)
Maksim Zinal

April 2017

M T W T F S S
     12
3456 789
10111213141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 22nd, 2017 04:44 am
Powered by Dreamwidth Studios