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. |
dateFormatScheme | Represents a possible set of date formats. The supported date format schemes are:
|
dateFormat | The arrangements of date, month, and year are in a java format that aligns with the dateFormatScheme. For example, the dateFormat of dd-MM-yyyy hh:mm:ss (03-Jun-2024 21:00:30) after tokenization has no impact on the time and the time remains unaltered, that is, 21:00:30 .• The dateformat must align with the dateFormatScheme to avoid any errors during tokenization or detokenization. The week year format YYYY and YY are not supported. It may lead to incorrect tokenization or detokenization. |
data | Data (Date) on which tokenization/detokenization is to be performed. |
startYear | The value of start year must be greater than 999 for yyyy dateFormat. The value of start year lies in the range from 00-100 for yy dateFormat. Optional, if preserve parameter is set to Year_Month or Year . |
endYear | Maximum value of end year is 9999 in yyyy dateFormat. Maximum value of end year is 100 in yy dateFormat. Optional, if preserve parameter is set to Year_Month or Year . |
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. |
preserve | Retains the specific part of data that remains unaltered after tokenization. The valid values are: — NONE (Default) — MONTH — YEAR — YEAR_MONTH For example, if the date to tokenize is 15-05-2024 and preserve is set to YEAR , then output can be 27-10-2024, where the year (2024) remains unaltered. |
Note
The startYear
and endYear
is mandatory if the preserve
type is NONE
Tokenization SOAP Sample
<prot:Session_Date2_Request>
<keyName>tedx</keyName>
<!--Optional:-->
<dateFormatScheme>DDMMYYYY</dateFormatScheme>
<dateFormat>yyyy-MM-dd</dateFormat>
<data>2024-02-29</data>
<transformationMode>tokenize</transformationMode>
<!--Optional:-->
<startYear>1950</startYear>
<!--Optional:-->
<endYear>2050</endYear>
<!--Optional:-->
<tweakData>1234567890987654321234567</tweakData>
<!--Optional:-->
<preserve>NONE</preserve>
</prot:Session_Date2_Request>
Tokenization Output
Tokenized date that is 2024-02-05.
<ns2:Session_Date2_Response xmlns:ns2="http://dsws.org/protectappws/">2022-11-25</ns2:Session_Date2_Response>
Detokenization SOAP Sample
<prot:Session_Date2_Request>
<keyName>tedx</keyName>
<!--Optional:-->
<dateFormatScheme>DDMMYYYY</dateFormatScheme>
<dateFormat>yyyy-MM-dd</dateFormat>
<data>2022-11-25</data>
<transformationMode>detokenize</transformationMode>
<!--Optional:-->
<startYear>1950</startYear>
<!--Optional:-->
<endYear>2050</endYear>
<!--Optional:-->
<tweakData>1234567890987654321234567</tweakData>
<!--Optional:-->
<preserve>NONE</preserve>
</prot:Session_Date2_Request>
Note
To maintain backward compatibility with CADP for JAVA 8.16.0, dateFormatScheme is optional for below date formats:
MM/dd/yyyy
yyyy-MM-dd
Detokenization Output
Detokenized date that is 2024-01-29.
<ns2:Session_Date2_Response xmlns:ns2="http://dsws.org/protectappws/">2024-02-29</ns2:Session_Date2_Response>
Reference
The specifications for the Date2 algorithm are listed here.