Optim Data Privacy Providers  11.7.0
 All Data Structures Files Functions Variables Macros Groups Pages
Specific Parameters
Collaboration diagram for Specific Parameters:

Base values used by Hash Defines

#define HASHOPERANDBASE   0x1A3A
 
#define HASHVALUEBASE   0x1A55
 

The following defines are associated with the usParameterID member of DP_INIT_OP_DEF structure.

#define ODPP_OPR_HASH_MAXVALUE   HASHOPERANDBASE + 2
 
#define ODPP_OPR_HASH_SEED_LIT   HASHOPERANDBASE + 3
 
#define ODPP_OPR_HASH_SEED_ENV   HASHOPERANDBASE + 4
 
#define ODPP_OPR_HASH_SEED_RANDOM   HASHOPERANDBASE + 5
 
#define ODPP_OPR_HASH_SEED_COL   HASHOPERANDBASE + 6
 
#define ODPP_OPR_HASH_DEST_COL   HASHOPERANDBASE + 7
 
#define ODPP_OPR_HASH_TRIM_CHARS   HASHOPERANDBASE + 8
 
#define ODPP_OPR_SRC_COL_SEP   HASHOPERANDBASE + 9
 
#define ODPP_OPR_HASH_FLAGS   HASHOPERANDBASE + 10
 
#define ODPP_OPR_HASH_ALGO   HASHOPERANDBASE + 11
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_NULL   HASHOPERANDBASE + 12
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_BLANK   HASHOPERANDBASE + 13
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_ZEROLEN   HASHOPERANDBASE + 14
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_NULL   HASHOPERANDBASE + 15
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_BLANK   HASHOPERANDBASE + 16 /*1A4A:6730*/
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_ZEROLEN   HASHOPERANDBASE + 17
 
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_MIXED   HASHOPERANDBASE + 18 /*1A4C:6732*/
 

Values for ODPP_OPR_METHOD

#define ODPP_METHOD_HASH   ODPP_METHOD_MASK
 

Values for ODPP_OPR_HASH_ALGO

#define ODPP_HASH_ALGO_1   HASHVALUEBASE + 0
 

Hash Service Provider Information Requests

#define ODPP_HASH_REQ_MAX_HASH_VALUE   HASHVALUEBASE + 24
 
#define ODPP_HASH_REQ_SEED_COL_INDEX   HASHVALUEBASE + 25
 

Values for ODPP_OPR_HASH_FLAGS

#define HASH_FLAG_SRC_TO_UPPER   1
 

Detailed Description

Macro Definition Documentation

#define HASHOPERANDBASE   0x1A3A
  • Use:
    This is the Base value which is used by Hash Parameter Defines.
  • Description:
    N/A
  • Optional:
    N/A
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    N/A
  • Example:
    N/A
#define ODPP_OPR_HASH_MAXVALUE   HASHOPERANDBASE + 2
  • Use:
    This parameter is used to specify a limit while generating hash values. The maximum number that can be specified as limit is 4,294,967,295.
  • Description:
    This parameter accepts a numeric value which will act as a limit to Hash value generation. No hash value greater than this number will be generated.

    If this parameter is not specified then the maximum value supported by the destination data type is used as the Max Hash Value.

    Only the following data types are supported in the destination column for calculating Max Hash Value:
    For example, if parameter ODPP_OPR_HASH_MAXVALUE is not specified,
  • Optional:
    Yes
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). Its value is specified in the uiVal member of the DP_INIT_OP_DEF structure. uiVal is a Four byte unsigned integer and hence the maximum limit is 4,294,967,295.
  • Example:
    • ODPP_OPR_HASH_MAXVALUE = 1,000,000
#define ODPP_OPR_HASH_SEED_LIT   HASHOPERANDBASE + 3
  • Use:
    This parameter is used to supply a literal seed value when a higher degree of Hash uniqueness is required.
  • Description:
    This parameter accepts a numeric value in the range 0 to 2,000,000,000 that will be used to seed the Hash algorithm. The Hash algorithm will generate a consistent output for a given set of input value and seed.

    If the literal value is out of seed range an error will be returned.

    If parameter ODPP_OPR_HASH_ALGORITHM is specified with value ODPP_HASH_ALGORITHM_SHA256, if an exit is present, the HMAC key provided by the exit is used and the numeric seed value is ignored. In the absence of an exit, the numeric seed value is used as the HMAC key.
  • Optional:
    Yes
    The default is zero.
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SEED_LIT = 100
#define ODPP_OPR_HASH_SEED_ENV   HASHOPERANDBASE + 4
  • Use:
    This parameter is used to supply the seed value using an Environment variable when a higher degree of Hash uniqueness is required.
  • Description:
    This parameter will accept an environment variable name in the form of a NULL terminated string. The Environment variable should provide a numeric value in the range of 0 to 2,000,000,000. The Hash algorithm will generate a consistent output for a given set of input value and seed.

    If the Environment Variable does not exist an error will be returned. If the value stored in the environment variable is invalid or out of seed range an error will be returned.

    If parameter ODPP_OPR_HASH_ALGORITHM is specified with value ODPP_HASH_ALGORITHM_SHA256, if an exit is present, the HMAC key provided by the exit is used and the numeric seed value is ignored. In the absence of an exit, the numeric seed value is used as the HMAC key.
  • Optional:
    Yes
    The default is zero.
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). Its value is specified in the pParamVal member of the DP_INIT_OP_DEF structure. The caller must allocate memory for pParamVal.
  • Example:
    • ODPP_OPR_HASH_SEED_ENV = "ENV_VAR_HASH_SEED"
#define ODPP_OPR_HASH_SEED_RANDOM   HASHOPERANDBASE + 5
  • Use:
    This parameter is used to tell the Hash algorithm to use a random seed value when a higher degree of Hash uniqueness is required.
  • Description:
    When this parameter is specified the Hash algorithm randomly generates the Seed value which is the current system time as returned by the CRT "time" function.
  • Optional:
    Yes
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). No value is required for this parameter. If a value is specified in the pParamVal member or the uiVal member of the DP_INIT_OP_DEF structure it will be ignored.
  • Example:
    • ODPP_OPR_HASH_SEED_RANDOM = ""
#define ODPP_OPR_HASH_SEED_COL   HASHOPERANDBASE + 6
  • Use:
    This parameter is used to specify the name of the column which contains the seed values for each row.
  • Description:
    This parameter accepts the name of a column which is in the list of DP_FIELD_DEF objects sent during Provider_Init(). The column name should be a NULL terminated string. The column should provide a numeric value in the range of 0 to 2,000,000,000. The Hash algorithm will generate a consistent output for a given set of input value and seed.

    The following rules apply:
    • If the column is not found an error will be returned and the Service Provider will stop.
    • If no corresponding DP_FIELD_DATA_DEF is found during the Provider_Service() call an error will be returned for the row, and the provider will continue processing other rows.
    • If an invalid value is supplied an error will be returned for the row, and the provider will continue processing other rows.
    • If the column value is NULL or NEGATIVE, a default value of 0 (zero) will be used for the seed.
    • No validation will be done for seed values exceeding 2,000,000,000.

  • Optional:
    Yes
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). Its value is specified in the pParamVal member of the DP_INIT_OP_DEF structure. The caller must allocate memory for pParamVal.
  • Example:
    • ODPP_OPR_HASH_SEED_COL = "SeedColumn"
#define ODPP_OPR_HASH_DEST_COL   HASHOPERANDBASE + 7
  • Use:
    This parameter is used to specify the name of the destination column which will hold the Hash value generated by the provider.
  • Description:
    This parameter accepts a NULL terminated string which contains the name of the destination column.

    Each DP_FIELD_DEF object has a ColName member. The Provider manager will search for the destination column in the DP_FIELD_DEF list by comparing the supplied name to ColName member of each DP_FIELD_DEF. Thus there should be a matching DP_FIELD_DEF object for successful initialization.

    For column names containing special characters the following rules apply:
    • A column name may start and end with matching delimiting double quote character (").
    • A column name must be enclosed in starting and ending double quotes when it contains a special character.
    • The special characters are the COMMA and the DOUBLE QUOTE.
    • A double quote character, when contained in a column name, must be preceded by a BACKSLASH (i.e. \ ) when the column name is enclosed in the required double quote character delimiters.

    For column names containing spaces the following rules apply:
    • Spaces before and after a column name will be skipped.
    • Any spaces in between the column name or enclosed by the double quotes with column name will be taken as part of column name.
    • In case a column name consists of only spaces the column name will be skipped.

    The following rules apply when using case sensitive column names:
    • All column names (i.e. the #ColName member of structure DP_FIELD_DEF and column names supplied using parameters) not enclosed in DOUBLE QUOTES will be upper-cased. This ensures case insensitive search of the columns.
    • To preserve case sensitivity and ensure case sensitive search use DOUBLE QUOTES around the column names.

  • Optional:
    No
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). Its value is specified in the pParamVal member of the DP_INIT_OP_DEF structure. The caller must allocate memory for pParamVal.
  • Example:
    • ODPP_OPR_HASH_DEST_COL = "DestinationColumn"
#define ODPP_OPR_HASH_TRIM_CHARS   HASHOPERANDBASE + 8
  • Use:
    This parameter is used to specify the characters that will be trimmed from the source value before hashing.
  • Description:
    This parameter accepts a NULL terminated string containing characters to be trimmed from the source value before it is hashed.

    The following rules apply:
    • If SPACE is used as a trim character, the whole input string needs to be enclosed in double quotes, otherwise any spaces in the input string will be skipped.

      In the following example the trim characters are a DOT, a COMMA and a BACKSLASH, and the spaces in between are skipped because the string is not quoted.
      ODPP_OPR_ HASH_TRIM_CHARS=. ,\

      To use SPACE as a Trim character enclose the Trim characters in double quotes as shown below:
      ODPP_OPR_ HASH_TRIM_CHARS=". ,\"

    • If DOUBLE QUOTES is used as a trim character and the input string is enclosed in double quotes then the DOUBLE QUOTE to be used as trim character should be preceded by a backslash ( '\' ).

  • Optional:
    Yes
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). Its value is specified in the pParamVal member of the DP_INIT_OP_DEF structure. The caller must allocate memory for pParamVal.
  • Example:
    • ODPP_OPR_HASH_TRIM_CHARS = ".,"
#define ODPP_OPR_SRC_COL_SEP   HASHOPERANDBASE + 9
  • Use:
    This parameter is used to specify a column separator when there are multiple source columns. Only once character can be used as a separator.
  • Description:
    This parameter accepts a NULL terminated string containing the character to be used to separate the column values during concatenation. When there are multiple source columns the source values will be concatenated using the supplied separator, to form a single source value.

    Consider two source columns COL1 and COL2, both of VARCHAR data type. COL1 contains 'AB' and COL2 contains 'C' in row 1. COL1 contains 'A' and COL2 contains 'BC' in row 2. If no separator was supplied the concatenated value for both row 1 and row 2 would be 'ABC'. If a COMMA was specified as the source separator then the concatenated value for row 1 would be 'AB,C' and the concatenated value for row 2 would be 'A,BC'. Thus supplying a separator achieves a certain degree of uniqueness for the concatenated values.

    The following rules apply:
    • If SPACE is used as a separator, it needs to be enclosed in double quotes, otherwise any SPACE(s) in the input string will be skipped.
    • If the input string does not contain any character or contains only spaces then no column separator would be used.
    • If the input string contains more than one separator the first character is used as separator.
      In the following example the column separator will be + and the COMMA is ignored.
      ODPP_OPR_SRC_COL_SEP = "+,"

  • Optional:
    Yes
    By default no separator will be used.
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    The parameter is specified in the usParameterID member of the DP_INIT_OP_DEF structure during Provider_Init(). Its value is specified in the pParamVal member of the DP_INIT_OP_DEF structure. The caller must allocate memory for pParamVal.
  • Example:
    • ODPP_OPR_SRC_COL_SEP = ","
#define ODPP_OPR_HASH_FLAGS   HASHOPERANDBASE + 10
  • Use:
    This parameter is used to specify flags that affect the behavior of the Hash algorithm.
  • Description:
    This parameter accepts flags that affect the behavior of the Hash Algorithm. The flags are predefined numeric values. Multiple flags can be specified by ORing them together as shown below.
    uiVal = ODPP_FLAG_SRC_TO_UPPER | <flag 1> | <flag 2> | ... ;
  • Optional:
    Yes
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_FLAGS = ODPP_FLAG_SRC_TO_UPPER
#define ODPP_OPR_HASH_ALGO   HASHOPERANDBASE + 11
  • Use:
    This parameter is used to specify the Hash algorithm that is to be used for hashing.
  • Description:
    This parameter takes predefined values as input. Currently the only valid value for this parameter is ODPP_HASH_ALGO_1. This is the only hashing algorithm available with ODPP Hash Service Provider at present.
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_ALGO = ODPP_HASH_ALGO_1
#define ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_NULL   HASHOPERANDBASE + 12
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Single Column" Hash Service Provider when the column is NULL
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -1
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_NULL = -1
#define ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_BLANK   HASHOPERANDBASE + 13
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Single Column" Hash Service Provider when the column is Blank (i.e. only spaces).
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -2
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_BLANK = -2
#define ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_ZEROLEN   HASHOPERANDBASE + 14
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Single Column" Hash Service Provider when the column Zero length.
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -3
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_SINGLE_COL_ZEROLEN = -3
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_NULL   HASHOPERANDBASE + 15
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Multiple Column" Hash Service Provider when all the columns are NULL.
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -1
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_NULL = -1
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_BLANK   HASHOPERANDBASE + 16 /*1A4A:6730*/
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Multiple Column" Hash service provider when all the columns are Blank (i.e. only spaces).
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -2
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_BLANK = -2
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_ZEROLEN   HASHOPERANDBASE + 17
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Multiple Column" Hash Service Provider when all the columns are Zero length.
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -3
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_ZEROLEN = -3
#define ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_MIXED   HASHOPERANDBASE + 18 /*1A4C:6732*/
  • Use:
    This parameter supplies the special value to return as "Hash Value" in "Multiple Column" Hash Service Provider when the columns are a combination of NULL/Blank/Zero Length values.
  • Description:
    The value for this operand will be a user supplied numeric value in the range of integer. It can be both a positive value as well a negative value.
  • Optional:
    Yes.

    DEFAULT :
    Default value is -4
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_SPL_HASH_VAL_MULTI_COL_MIXED = -4
#define HASHVALUEBASE   0x1A55
  • Use:
    This is the Base value which is used by Hash Parameter Value Defines.
  • Description:
    N/A
  • Optional:
    N/A
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    N/A
  • Example:
    N/A
#define ODPP_METHOD_HASH   ODPP_METHOD_MASK
  • Use:
    This parameter value is used for consistent masking and is the only valid value for parameter ODPP_OPR_METHOD when Hash Service Provider is used.
  • Description:
    When this parameter value is specified, the output is a hash value which may not be unique but it is consistent for a given set of Input and Seed values.
  • Optional:
    No
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_METHOD = ODPP_METHOD_HASH
#define ODPP_HASH_ALGO_1   HASHVALUEBASE + 0
  • Use:
    This parameter value is the default Hashing algorithm.
  • Description:
    When this parameter value is specified, the default hashing algorithm is used by the Hash Service Provider.
  • Optional:
    N/A
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_ALGO = ODPP_HASH_ALGO_1
#define ODPP_HASH_REQ_MAX_HASH_VALUE   HASHVALUEBASE + 24
  • Use:
    This request is used in Provider_GetInfo() to get the maximum Hash value stored in the service provider control block.
  • Description:
    This Service Provider Information request is specified in parameter sRequest in the call to Provider_GetInfo(). The maximum Hash value stored in the service provider control block will be returned in ptr which should point to a Eight byte unsigned integer.

    Certain information requests may not be supported by all the Service Providers. If the request is not supported, the Service Provider will return a valid ODPP Error Code.
  • Optional:
    N/A
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    N/A
  • Example:
    N/A
#define ODPP_HASH_REQ_SEED_COL_INDEX   HASHVALUEBASE + 25
  • Use:
    This request is used in Provider_GetInfo() to get the index of the Hash Seed column.
  • Description:
    This Service Provider Information request is specified in parameter sRequest in the call to Provider_GetInfo(). The index of the Hash Seed column stored in the service provider control block will be returned in ptr.

    Certain information requests may not be supported by all the Service Providers. If the request is not supported, the Service Provider will return a valid ODPP Error Code.
  • Optional:
    N/A
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Specification Protocol:
    N/A
  • Example:
    N/A
#define HASH_FLAG_SRC_TO_UPPER   1
  • Use:
    This parameter value is used to convert the source value to upper case before hashing.
  • Description:
    The case of the source value is not changed by default before hashing. The source value will be converted to upper case before hashing if this flag is specified.
  • Optional:
    N/A
  • Exclusive:
    N/A
  • Inclusive:
    N/A
  • Example:
    • ODPP_OPR_HASH_FLAGS = HASH_FLAG_SRC_TO_UPPER