insertIrreversibleToken()
insertIrreversibleToken() API encrypts plaintext values, creates irreversible tokens, insert tokens into the token vault, and return the tokens.
Note
The tokens which are generated using insertIrreversibleToken() method will not return the plaintext value, when passed in the get() method. The method will instead return the string value “Irreversible Token”
If the plaintext value along with the custom data is already tokenized using insert() method, this method simply returns the existing token. Such tokens are not irreversible tokens..
This API supports Unicode (multibyte format) tokens.
Request URL
http://localhost:8080/tmrest/SafeNetTokenManager/insertIrreversibleToken
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. |
values | 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(). |
luhnCheck (optional) | boolean indicates if the value must pass a Luhn check (true) or if there is no requirement (false). Token formats created using the createNewFormat() method may have one of three luhnCheck rules, the rules are must fail test, no requirement, and must pass test. |
tokenProperty (optional) | A 16 bits alphanumeric string, attached to the token. |
customTokenProperty (optional) | A string of up to 255 characters including special characters. |
customData (optional) | The customer-specific data associated with each plaintext value. |
saveException (optional) | boolean indicates if the Smart Check feature is applied (See Smart Check). When set to true, the feature is applied. |
The priority of the luhnCheck boolean in insert() and the luhnCheck integer in createNewFormat() vary, depending on their values, as can be seen in this image:
Returned Values
Returned the output tokens, status and error details, if any.
Example
{
"naeUser":"jit",
"naePassword":"xxxxxxxx",
"dbUser":"sa",
"dbPassword":"xxxxxxxx",
"values":["23333333333333","2222222222222","4444444444444"],
"tableName":"test",
"format":"3",
"tokenProperty":["1568745210365489","1568745210365111","1568745210365222"],
"saveexEception":"true"
}
Result
{
tokens: [3]
0:"25863143853456"
1:"4302578582145"
2:"6627979014777"
}