mask()
mask() API generates new tokens without storing any data in the Token Vault. There is no CT-V API that can retrieve the original values from the tokens created using this method.
Request URL
http://localhost:8080/tmrest/SafeNetTokenManager/batch/mask
Method
POST
Request Parameters
Parameters | Descriptions |
---|---|
naeUser | A Key Manager user with access to the AES and HMAC keys. |
naePassword | The Key Manager user’s password. |
dbUser (optional) | A database user with access to the token table. |
dbPassword (optional) | The database user’s password. |
value(s) | The data to be tokenized. |
tableName | This is the Token Vault name and it must be in CAPITAL LETTERS. |
format | One of the predefined token formats or a format created using createNewFormat(). For more information about the available formats, see [Using Token Formats]. |
startToken | This is the seed value of the generated tokens, if the format is SEQUENTIAL_TOKEN. There are two possible values for the startToken parameter: • Null: If null is assigned to startToken parameter, then the length of the token(s) generated is same as the length of the first value of the plaintext array. The default start token value is 0111111111...... • Value: If there is a specific value assigned to the startToken parameter, it becomes the first token of the generated output. The rest of the tokens are sequentially generated. |
luhnCheck (optional) | boolean indicating if the value must pass a luhnCheck (true) or if there is no requirement (false). Be aware that Token formats created using the createNewFormat() method may have one of three luhnCheck rules (must fail test, no requirement, or must pass test). |
The priority of the luhnCheck boolean in insert() and the luhnCheck integer in createNewFormat() vary depending on their values, as shown in the following figure:
Returned Values
String array of tokens created for the input value.
Example
{
"naeUser":"jit",
"naePassword":"xxxxxxxx",
"dbUser":"sa",
"dbPassword":"xxxxxxxx",
"values": ["25863143853333","4302578582222","6627979014444"],
"tableName":"test",
"format":"3",
}
Result
{
tokens: [3]
0:"91393990813333"
1:"8641611662222"
2:"8071628204444"
}