insertIrreversibleToken()
insertIrreversibleToken() API encrypts plaintext values, creates irreversible tokens, insert tokens into the token vault, and return the tokens.
Note
The tokens are generated using insertIrreversibleToken() method will not return the plaintext value, when passed in the get() method.
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.
Syntax
public TmResult insertIrreversibleToken(String[] values, String[] customData, String table, int format, boolean luhnCheck, boolean saveExceptions, TokenProperty[] tokenProperty) throws TokenException
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
value[] | string[] | The data to be tokenized. Input data can be no longer than 256 characters. |
customData[] | string[] | Customer-specific data to appear. |
table | string | This is the Token Vault name and it must be in CAPITAL LETTERS. |
format | integer | One of the predefined token formats or a format, which is created using createNewFormat(). For more information about the available formats, see Token Formats. |
luhnCheck | boolean | 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[] | The tokenProperty[] associated with the tokens to be created. | |
saveExceptions | boolean | Use this as a toggle to turn on the Smart Check feature. 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.
Exception
Throws TokenException
if:
The table is missing.
The format is invalid.
The value is null or contains anything other than digits, white spaces, or dashes.
The value and customData arrays are not the same size.
A customData element is too long or too short.