Data tokenization and anonymization operations.
See HSM technical documentation about operating details, specifications used, licenses and module trade name.
Functions | |
| int AAP_API | DSVaultGenToken (HSESSIONCTX hSession, DWORD dwOp, BYTE *pbInData, BYTE *pbTokenBlob, DWORD *pdwTokenBlobLen, char *szToken, DWORD dwReserved) |
| int AAP_API | DSVaultGetData (HSESSIONCTX hSession, DWORD dwOp, const char *szMK, const char *szMask, BYTE *pbTokenBlob, DWORD dwTokenBlobLen, char *szData, DWORD *pdwDataLen, DWORD dwReserved) |
| int AAP_API DSVaultGenToken | ( | HSESSIONCTX | hSession, |
| DWORD | dwOp, | ||
| BYTE * | pbInData, | ||
| BYTE * | pbTokenBlob, | ||
| DWORD * | pdwTokenBlobLen, | ||
| char * | szToken, | ||
| DWORD | dwReserved ) |
#include <dinamo.h>
Tokenizes data, generating a token blob and its corresponding token.
| [in] | hSession | Context acquired through the DOpenSession() function. . |
| [in] | dwOp | Operation type. Must be 0. |
| [in] | pbInData | Input data for token generation. The SVAULT_GEN_TOKEN structure must be used. |
| [out] | pbTokenBlob | Buffer that will contain the token blob. Pass a buffer of size D_SVAULT_TOKEN_BLOB_LEN on input. pdwTokenBlobLen will contain the size of the output buffer. The token blob protects the secret and its metadata. This buffer should be saved and used in the call to DSVaultGetData() for later retrieval of the secret or token. |
| [in,out] | pdwTokenBlobLen | Size of pbTokenBlob. The input contains the total size of the pbTokenBlob buffer and the output contains the size of the data copied into pbTokenBlob. |
| [out] | szToken | A string of size D_SVAULT_MAX_TL + 1 that will contain the generated token. NULL can be passed if the generated token is not to be retrieved. The token can be retrieved again using the DSVaultGetData() API. |
| [in] | dwReserved | Reserved for future use (must be 0). |
| int AAP_API DSVaultGetData | ( | HSESSIONCTX | hSession, |
| DWORD | dwOp, | ||
| const char * | szMK, | ||
| const char * | szMask, | ||
| BYTE * | pbTokenBlob, | ||
| DWORD | dwTokenBlobLen, | ||
| char * | szData, | ||
| DWORD * | pdwDataLen, | ||
| DWORD | dwReserved ) |
#include <dinamo.h>
Retrieves the secret or token from tokenized data using a token blob. This API also enables the retrieval of masked secrets or tokens.
| [in] | hSession | Context acquired through the DOpenSession() function. . | ||||||
| [in] | dwOp | Operation type. It can be one of the following options.
| ||||||
| [in] | szMK | Name of the key used for data protection. | ||||||
| [in] | szMask | Masking pattern to be applied to the secret or token, as defined during the generation of the token blob in DSVaultGenToken(). This buffer has a minimum size of D_SVAULT_MIN_TL and a maximum size of D_SVAULT_MAX_TL and contains the mask. It can be NULL to disable masking. The mask is a UTF-8 string containing characters that will be applied to the data for masking. Pass '\0' in positions where the original data should be displayed. See the remarks for examples. | ||||||
| [in] | pbTokenBlob | Buffer of size D_SVAULT_TOKEN_BLOB_LEN, generated by the DSVaultGenToken() API, containing the token blob. | ||||||
| [in] | dwTokenBlobLen | Buffer with a maximum size of D_SVAULT_TOKEN_BLOB_LEN, generated by the DSVaultGenToken() API, containing the token blob. | ||||||
| [out] | szData | String that will contain the token or secret as specified in dwOp. You can use a size of D_SVAULT_MAX_TL + 1 to cover all current data. | ||||||
| [in,out] | pdwDataLen | Size of the szData string. It should contain the size of szData and in the API return it will contain the total size of the copied data. | ||||||
| [in] | dwReserved | Reserved for future use (must be 0). |
Using the mask "***" will yield the following result.
Applying the mask "9999" will yield the following result.
Applying the mask "***\0\0\0***" will yield the following result.