# Character Scramble (TextMaskGenerator)

The [Character Scramble](https://docs.tonic.ai/app/generation/generators/generator-reference/character-scramble) generator replaces letters with random other letters and numbers with random other numbers. It preserves punctuation, whitespace, and mathematical symbols.

## Link object structure <a href="#generator-api-character-scramble-link-object" id="generator-api-character-scramble-link-object"></a>

You can configure the Character Scramble generator to be self-consistent, but not consistent to another column. You cannot configure differential privacy.

The `metadata` object is populated from the [`BaseMetadata`](https://app.tonic.ai/apidocs/index.html#/models/BaseMetadata) object.

There is no generator-specific configuration.

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "TextMaskGenerator",
    "isConsistent": boolean,
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string" //If custom value processor applied
  }
}
```

## Example replacement <a href="#generator-api-character-scramble-replacement" id="generator-api-character-scramble-replacement"></a>

The following replacement for a Character Scramble generator has consistency disabled.

```json
{
  "name": "occupation",
  "schema": "test",
  "table": "users",
  "links": [
    {
      "schema": "test",
      "table": "users",
      "column": "group_identifier",
      "metadata": {
        "presetId": "TextMaskGenerator"
        "generatorId": "TextMaskGenerator",
        "isConsistent": false
      }
    }
  ]
}
```
