Return plaintext for token
detokenize()
This API returns the plaintext corresponding to the input token or an array of tokens. User should have decrypt permission on the key to perform detokenization.
public String detokenize(String token, TokenSpec tokenSpec)
public String[] detokenize(String[] tokens, TokenSpec tokenSpec)
Parameters
Parameter | Description |
---|---|
token(s) | The token(s) corresponding to the plaintext(s). |
tokenSpec | The parameters based on which the tokens is to be detokenized. |
Caution
The TokenSpec and the AlgoSpec, if used, should be same as the one used for tokenization, otherwise, the validity of the plaintext cannot be ensured.
Returned values
String or string[]: The plaintext(s) corresponding to the token(s).
Exception
Throws TokenExceptions
if any parameter is missing, invalid, or value cannot be detokenized.