Creating a Function Module
After creating a structure, the user has to create function modules. These function modules are just wrappers for corresponding CT-V APIs. Refer to CipherTrust Vaulted Tokenization User Guide for details on the API related parameters and methods corresponding to function modules.
Following is the list of function modules required to be created:
Function Module | Description |
---|---|
INSERTOKEN | To Insert a token in token vault for a single value. |
INSERTCUSTGENVALIDATOR | To Insert a token in token vault for a single value with custom data. Depending upon the "ITOKEN" value, if it is ITokenGenerator implementation, the generation logic of token will be decided by it. If it is ITokenValidator implementation, the generated token is validated against it.The token can be validated maximum up to 100 times, after which the insert operation fails with an exception. |
INSERTBATCH | To Insert an array of tokens in token vault for an array of values. |
INSERTBATCHWITHCUSTOMDATA | To Insert an array of tokens in token vault for an array of values with custom data. |
INSERTBATCHSMARTCHECK | To Insert token array in token vault for array of values with custom data. "SAVEEXCEPTION" enforces "Smart Check" that enables you to bypass errors that occur in batch insert and proceed with the remaining elements for insertion. |
DELETETOKEN | To Delete the token from the token vault. |
DELETETOKENBATCH | To Delete the array of tokens from the token vault. |
DELETEVALUE | To Delete the token corresponding to input plaintext value from the token vault. |
DELETEVALUEBATCH | To Delete the token array corresponding to the input value array from the token vault. |
GETVALUE | To Get plain value for a token from the token vault. |
GETVALUEBATCH | To Get an array of values for input token array from the token vault. |
GETTOKEN | To Get the token for the corresponding input value and custom data, from the token vault. |
GETTOKENBATCH | To Get the token array for the corresponding input value array and custom data array, from the token vault. |
GETTOKENSBYDATE | To Get the token array created on or before a specific date, from the token vault. |
GETTOKENSBYRANGEDATE | To Get the token array between the specific dates applied on CREATION_DATE or LAST_ACCESS_DATE , indicated by "COLUMNIDENTIFIER", from the token vault. |
CREATENEWTOKENFORMAT | To Create a new token format specifying the "leading" and "trailing" position to be preserved in the input value. The mask, if specified, is a fixed number of digits to mask the leading positions of input value ignoring the "leading" parameter. |
CREATETOKENFORMATRANGELENGTH | To Create a new token format specifying the min and max length of the token. The mask, if specified, is a fixed number of digits which will mask the leading positions. |
CREATETOKENFORMATTOKENLENGTH | To Create a new token format specifying token's length, the "leading" and "trailing" position to be preserved in the input value. The mask, if specified, is a fixed number of digits which will mask the leading positions of input value ignoring the "leading" parameter. |
CREATEGENVALTOKENFORMAT | To Create a new token format which either generates a token based on ITokenGenerator or validates a token based on ITokenValidator . |
CREATEREGEXTOKENFORMAT | To Create a new token format based on the regular expression. |
MASK | To Create a token without inserting it in the token vault. |
MASKWITHFORMAT | To Create a token of specified format without inserting it in the token vault. |
To create a function module, follow the steps described below:
Note
Following steps explain the creation of InsertToken
function module. For other modules, the steps remain the same and only Import, Export and Tables tab parameters differ.
Right-click the package name in the package hierarchy. A menu appears as shown in the screen below:
Click Create > Function Group. Following screen appears:
Enter Short text description for the functional group and click Save. The Function Group appears in the package hierarchy.
Right-click the function group name. The menu appears.
Select Create> Function Module. Following screen appears:
Enter Short text and click Save. The Function Module gets saved and appears under Function Group > Function Module.
Double-click the INSERTTOKEN function module and on the Import tab (Input parameters), add the following parameters:
NAEUSER - The NAE username.
NAEPASSWORD - The NAE password.
DBUSER - The database username.
DBPASSWORD - The database password.
VALUE - A plaintext value that has to be tokenized.
TABLENAME - The name of the token vault.
FORMAT - The format of the returned value.
LUHNCHECK - Boolean value (true/false) to decide if Luhn check will be applicable on token. CT-V can apply a Luhn check to numeric tokens in order to ensure that the token is a valid number combination that can be used in client applications. Likewise, CT-V can apply a negative Luhn check to ensure that tokens cannot be mistaken for cleartext values.
CUSTOMDATA - The customer-specific data associated with the plaintext value(s).
Note
The Parameter Name must be all in CAPS as shown in the screen above. The Typing parameter must be Type.
The Associated Type for each parameter must be same as shown in the screen above with Pass Value option selected for all.
The user must save and activate the function module.
Add the following parameter on Export tab (Output parameters):
TOKEN - A token returned as an encrypted value, corresponding to the input plaintext.
Note
The Parameter Name must be all in CAPS as shown in the screen above. The Typing parameter must be Type.
The Associated Type for each parameter must be same as shown in the screen above with Pass Value option selected for all.
The user must save and activate the function module.
Click on Source code tab. It would appear as shown in the screen below: