CreateNewTokenFormatWithTokenLength()
CreateNewTokenFormatWithTokenLength() creates a new token format which can be used with InsertToken, InsertTokenWithCustomData, InsertBatch, and InsertBatchWithCustomData. Formats created using this method returns tokens of the length specified in tokenLength.
Syntax
public Integer CreateNewTokenFormatWithTokenLength (String naeUser, String naePassword, String dbUser, String dbPswd, Integer leadPositions, Integer trailPositions, String leadMask, Integer luhnCheck, Integer tokenLength)
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
naeUser | string | A Key Manager user with access to the AES and HMAC keys. |
naePassword | string | The Key Manager user’s password. |
dbUser | string | A database user with access to the token table. |
dbPswd | string | The database user’s password. |
leadPositions | integer | Number of positions to preserve (if any) on the left side of the value. |
trailPositions | integer | Number of positions to preserve (if any) on the right side of the value. |
leadMask | string | A fixed number of digits to mask the leading positions. For example, if leadMask is set to 7777, the first four digits of the token will be 7’s. When leadMask is set, the leadPositions value is ignored. For example, for input value 1234 5678 9012 3456, setting leadMask to 7777 and leadPosition to 6 results in 7777 8031 4902 1531 and not 7777 5631 4902 1531. Note: leadPositions + trailPositions or leadMask + trailPositions cannot be larger than the length of the plaintext. |
luhnCheck | integer | Indicates if the token should fail the check (-1), pass the check (1), or does not matter (0). |
tokenLength | integer | Indicates the length of the token. When set to 0, the token length equals the input data length. |
Returned Values
An integer value representing the new token format, the value will be greater than 100.