deleteValue()
deleteValue() deletes the ciphertext and its corresponding token from the token vault.
Note
This method is overloaded to handle string and string arrays, and to account for the optional customData parameter.
!yaml
public void deleteValue(string value, string table) public void deleteValue(string[] values, string table) public void deleteValue(string value, string customData, string table) public void deleteValue(string[] values, string[] customData, string table)
If your application calls insert()
, get()
, or deleteValue()
within a loop, make sure that it starts the token service outside of the loop. See Sample: Starting the Token Service Outside of the Loop.
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
value | string | A plaintext value that has been tokenized, or an array of values. |
customData | string or string[] | Customer-specific data. Note: For My SQL, If the customData parameter is null or empty, then the deleteValue() API deletes record based on values in the vault. |
table | string | This is the Token Vault name and it must be in CAPITAL LETTERS. |
Exception
Passes an exception if:
Table is missing or if value is null or invalid.
The value and customData arrays do not have the same number of elements.
A customData element is too long.
Example
deleteValue("1234567890123456", "CREDIT_CARD_NUMBERS");
The method does the following:
Identifies the mac value for the plaintext value.
Creates the SQL statement that identifies the row based on the mac value and deletes it from the token vault.
Executes the SQL statement.