Skip to content

Obfuscate

The Obfuscate transformer is used to obfuscate/mask values.

Alternation

This transformer will mutate existing value by replacing chars with specified symbol.

Valid Data Types
  • String

Default

Without specifying any options the obfuscate transformer will start masking from the 3rd char and will do so until the end of the text. The default symbol * will be used.

Options

symbol

Optional field for specicying which character should be used to obfuscate the values.

Default value: *

start-at

Optional field for specicying from where the obfuscation should start.

Default value: 3

stop-at

Optional field for specicying where the obfuscation should stop.

Default value is until the end of the string.

Examples

Default

Column value: 'Obfuscation example'

skifta.toml
[[table.columns]]
name = "column-example"
transformer = "obfuscate"

Result: 'Obf****************'


Specifying symbol

Column value: 'Obfuscation example'

skifta.toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { symbol = "?" } }

Result: 'Obf????????????????'


Specifying start-at

Column value: 'Obfuscation example'

skifta.toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { start-at = 10 } }

Result: 'Obfuscatio*********'


Specifying stop-at

Column value: 'Obfuscation example'

skifta.toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { stop-at = 10 } }

Result: 'Obf*******n example'


Specifying all options

Column value: 'Only obfuscate transformer text'

skifta.toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { start-at = 15, stop-at = 26, symbol = "~" } }

Result: 'Only obfuscate ~~~~~~~~~~~ text'

Alias

Another alias for the transformer is redact

skifta.toml
[[table.columns]]
name = "column-example"
transformer = "redact"