DeTokenization for Delimited Type Tokenized Input File Using Detokenization.properties File
In this sample, using Bulk DeTokenization, a tokenized data file will be detokenized using detokenization.properties
file.
Creating the Input Data File
Below is the data that will be used to populate the Tokenized.csv file
:
Setting Parameters for Detokenization.properties File
#####################
# Input Configuration
# Input.FilePath
# Input.Type
#####################
#
Input.FilePath = C:\\Desktop\\migration\\tokenized.csv
#
Input.Type = Delimited
###############################
# Delimited Input Configuration
# Input.EscapeCharacter
# Input.QuoteCharacter
# Input.ColumnDelimiter
###############################
#
Input.EscapeCharacter = \\
#
Input.QuoteCharacter = "
#
Input.ColumnDelimiter = ,
###########################################
# DeTokenization Configuration
# DeTokenizer.Column0.TokenVault
# DeTokenizer.Column0.TokenFormat
# ...
# DeTokenizer.ColumnN.TokenVault
# DeTokenizer.ColumnN.TokenFormat
############################################
#
DeTokenizer.Column5.TokenVault = BTM
DeTokenizer.Column6.TokenVault = BTM_2
#
DeTokenizer.Column5.TokenFormat = 0
DeTokenizer.Column6.TokenFormat = 0
######################
# Output Configuration
# Output.FilePath
# Output.Sequence
######################
#
Output.FilePath = C:\\Desktop\\migration\\output.csv
# Specifies the file path where the intermediate temporary chunks of
# outputs are stored.
#
# Note: If no intermediate file path is set, then the path specified in
# Output.FilePath is used as the intermediate file path.
#
Intermediate.FilePath =
#Set positive value for columns to be detokenized. For example column 5 and 6
#have been set positive below, so now only these two columns will be detokenized.
Output.Sequence = 0,-1,-2,-3,-4,5,6
# TokenSeparator
#
# Specifies if the output values are space separated or not.
# Note: This parameter is ignored if Input.Type is set to Delimited.
#
# Valid values
# true
# false
# Note: Default value is set to true. TokenSeparator = true
#
# StreamInputData
#
# Specifies whether the input data is streamed or not.
#
# Valid values
# true
# false
# Note: Default value is set to false.
#
StreamInputData = false
Note: This parameter is ignored if Input.Type is set to Delimited.
#
# CodePageUsed
#
# Specifies the code page in use.
# Used with EBCDIC character set for ex. use "ibm500" for EBCDIC International
# https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html
#
CodePageUsed =
Note: If no value is specified, by default, ASCII character set is used.
#
# FailureThreshold
#
# Specifies the number of errors after which the Bulk Utility aborts the
# detokenization operation.
# Valide values
# -1 = Detokenization continues irrespective of number of errors during the
# operation. This is the default value.
# 0 = Bulk utility aborts the operation on occurance of any error.
# Any positive value = Indicates the failure threshold, after which the Bulk
# Utility aborts the operation.
#
# Note: If no value or a negative value is specified, Bulk Utility will continue
# irrespective of number of errors.
#
FailureThreshold = -1
###############################################################################
# END
###############################################################################
Running CipherTrust Vaulted Tokenization Bulk Utility
Enter the following command to encrypt with CT-V Bulk Utility in a Windows environment:
java -cp SafeNetTokenService-8.12.3.000.jar com.safenet.token.migration.main detokenization.properties -d DSU=NAE_User1 DSP=qwerty12345 DBU=DB_User1 DBP=abcd1234
Reviewing the Output File
The output data file is saved at the same path mentioned in the detokenization.properties
file with the same name output.csv
. As specified in the output sequence parameter, only column 5 and 6 have been detokenized.
Here is the data from the output file: