TokenSpec
TokenSpec allows users to set the parameters based on which the plaintext is tokenized/detokenized. The five parameters of TokenSpec are:
groupID: This parameter sets the group ID (
long
) for the plaintext to be tokenized. Different tokens will be generated for the same plaintext having different group IDs. The default value is set to0
.luhnCheck: This parameter determines if the luhn digit of the token generated should pass or fail the luhnCheck. The possible values for luhncheck are
true
orfalse
. If no value is specified then CADP for Java does not luhn validate the generated token. Iftrue
orfalse
is specified for this parameter, the input plaintext should also have a valid luhn digit.nonIdempotentTokens: This parameter determines if the same or different tokens are generated for the same input plaintext. If the value is set to
true
, CADP for Java may generate different tokens even if same input plaintext is tokenized again and again. If the value is set tofalse
, CADP for Java will generate the same token for the same input plaintext each time it is tokenized. The default value is set tofalse
.clearTextSensitive: This parameter determines if the digits in the clear-text position of the input plaintext is used to generate the token. For enhanced security, user can set the value to
true
. The default value isfalse
. IfToken_ALL
format is used, theclearTextSensitive
parameter is not applicable.
Note
luhnCheck and nonIdempotentTokens parameters are not applicable if plaintext contains alphabet.
format: This parameter allows user to set the structure of the token generated. Following Special characters
@
_
:
%
+
!
/
( )
.
;
,
‘
including spaces in the plaintext are retained in the generated token. The supported formats are:Formats Description TOKEN_ALL Creates a token in which all digits/alphabets of the input plaintext are replaced with random digits/alphabets.This is the default format.
Example
input plaintext: abc_123@gmail.com
token generated: CLS_040@xpiiS.oEvLAST_FOUR_TOKEN Creates a token that retains the last four original characters of the input plaintext. FIRST_SIX_TOKEN Creates a token that retains the first six original characters of the input value. FIRST_TWO_LAST_FOUR_TOKEN Creates a token that retains the first two and last four original characters of the input plaintext. FIRST_FOUR_LAST_FOUR_TOKEN Creates a token that retains the first four and last four original characters of the input plaintext. FIRST_SIX_LAST_FOUR_TOKEN Creates a token that retains the first six and last four original characters of the input plaintext.