CreateNewTokenFormatWithTokenLength()
Creates a new token format that can be used with InsertToken
, InsertTokenWithCustomData
, InsertBatch
, and InsertBatchWithCustomData
. Formats created using this method will return 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 | The Key Manager user with access to the AES and HMAC keys. |
naePassword | String | The Key Manager user’s password. |
dbUser | String | The database user with access to the token table. |
dbPswd | String | The database user’s password. |
leadPositions | Int | Number of positions to preserve (if any) on the left side of the value. |
trailPositions | Int | 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 | Boolean | Indicates if the token should fail the check (-1), pass the check (1), or does not matter (0). |
tokenLength | Int | Indicates the length of the token. When set to 0, the token length equals the input data length. |
Returned Value
Returned Value | Description |
---|---|
Integer | The integer representing the new token format. This value will be greater than 13. |