Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

MASKNM

Updated on 2022-09-19 GMT+08:00

Mask the first n and last m characters and retain the content in the middle part of the specified character string.

Request Parameters

Table 1 Parameter description

Parameter

Mandatory

Type

Description

algorithm

Yes

String

Algorithm type, for example, MASKNM

parameters

Yes

For details, see Table 2.

Parameters for configuring a data masking algorithm

Table 2 Parameters for configuring a data masking algorithm

Parameter

Mandatory

Type

Description

type

Yes

String

Character masking methods are described as follows:

  • CHAR: Character masking
  • RAND: Random masking

method

Yes

String

Masking method

If type is set to RAND, this parameter can be set as follows:

  • CHAR: Replace the data to be masked with characters.
  • DIGITAL: Replace the data to be masked with numbers.
  • BOTH: Replace the data to be masked with letters and numbers.

n

Yes

Int

Mask the first n characters.

m

Yes

Int

Mask the last m characters.

Example Request

{
    "mask_strategies": [
        {
            "name": "col1",
            "algorithm": "MASKNM", 
            "parameters": {
                "type": "CHAR",
                "n": 1,
                "m": 1,
                "method": "*"
            }
        }
    ],
    "data": [
        {
            "col1": "test"
        }
    ]
}
Or
{
    "mask_strategies": [
        {
            "name": "col1",
            "algorithm": "MASKNM", 
            "parameters": {
                "type": "RAND",
                "n": 1,
                "m": 1,
                "method": "BOTH"
            }
        }
    ],
    "data": [
        {
            "col1": "test"
        }
    ]
}
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback