Data Mask SQL



Sample SQL...

 Mask Type: Transform.Scramble =====================================================================================*/
Table: [dbo].[DimAccount]
Column: [ValueType]
* Type: 'Transform: Scramble'
* Params: 'QeufGR2$nchGG#$'
* Category: 'Transform' - Overwrite all rows with an "obsfucated" original value
* Descrip: This mask transforms each row by scrambling it. The values are actually
           encrypted, but then downgraded to scrambling to preserve the original
           string length and fit within its bounds.
           1. Strip off the first 11 characters of 0x000000000, then return all the
              hex characters from the encryption routine
           2. Retain original value's size with LEFT($); even though uniqueness no
              longer guaranteed
UPDATE [dbo].[DimAccount]
SET [ValueType] = SUBSTRING(
   SYS.fn_varbintohexstr(EncryptByPassPhrase('QeufGR2$nchGG#$', [ValueType]))
   , 11
   , LEN([ValueType])); 


eXTReMe Tracker