Create token for the plaintext
tokenize()
This API tokenizes the input plaintext value or array of plaintext values, and returns the token(s). The user must have encrypt permission on the key to perform tokenization.
public String tokenize(String value, TokenSpec tokenSpec)
public String[] tokenize(String[] values, TokenSpec tokenSpec)
Parameters
Parameter | Description |
---|---|
value(s) | The plaintext value(s) to be tokenized. The value(s) can be of 1 to 128 characters in length excluding any special characters and spaces. |
tokenSpec | The parameters based on which the plaintext is to be tokenized. |
Returned values
String or string[]: The token(s)generated based on the specified TokenSpec.
Exception
Throws TokenExceptions
if any parameter is missing, invalid, or value cannot be tokenized.