Session_Date2_Request
This API performs tokenization and detokenization of dates.
URL
./Session_Date2_Request
Input Parameters
Parameters | Description |
---|---|
keyName | Name of the key to be used for tokenization and detokenization of dates. |
dateFormat | The format in which the date to be tokenized/detokenized is specified. This parameter should be specified in Java supported date format. The allowed formats are: — MM/dd/yyyy — yyyy-MM-dd |
data | Data (Date) on which tokenization/detokenization is to be performed. |
startYear | The value of start year in yyyy format; must be greater than 999. |
endYear | The value of end year in yyyy format. |
transformationMode | Transformation mode. Supported modes are: tokenize and detokenize. |
tweakData | Optional, if provided, the length of tweak data should be ≤ 256 characters. The default value is empty string. |
Note
The value of startYear
, endYear
, tweakData
, and keyName
once initialized for Date2 algorithm should not be altered; if these values are changed, the Date2 algorithm will not work and throw an error. To change any of these values, restart your application.
Tokenization SOAP Sample
<prot:Session_Date2_Request>
<keyName>test_key1</keyName>
<dateFormat>yyyy-MM-dd</dateFormat>
<data>2024-01-29</data>
<startYear>2024</startYear>
<endYear>2025</endYear>
<transformationMode>tokenize</transformationMode>
<!--Optional:-->
<tweakData>wowowooww</tweakData>
</prot:Session_Date2_Request>
Tokenization Output
Tokenized date that is 2024-02-05.
<ns2:Session_Date2_Response xmlns:ns2="http://dsws.org/protectappws/">2024-02-05</ns2:Session_Date2_Response>
Detokenization SOAP Sample
<prot:Session_Date2_Request>
<keyName>test_key1</keyName>
<dateFormat>yyyy-MM-dd</dateFormat>
<data>2024-02-05</data>
<startYear>2024</startYear>
<endYear>2025</endYear>
<transformationMode>detokenize</transformationMode>
<!--Optional:-->
<tweakData>wowowooww</tweakData>
</prot:Session_Date2_Request>
Detokenization Output
Detokenized date that is 2024-01-29.
<ns2:Session_Date2_Response xmlns:ns2="http://dsws.org/protectappws/">2024-01-29</ns2:Session_Date2_Response>
Reference
The specifications for the Date2 algorithm are listed here.