BuildUniqueConfigurationID

BuildUniqueConfigurationID

Minor Business Rule

Object Name: B3201440

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function will take a pointer ID to any size string as an input. The actual pointer is retrieved by 

jdeRetrieveDataPtr  API. The function will produce a 32 character string (plus  Null terminator), 

which is an ASCII translation of a message digest (128 bits chunk of memory).

The function will use the MD5 algorithm to produce a digest.

Note: The driver is derived from Custom  Works sample code.


The calling application is responsible for loading all appropriate values.  



1.3Special Logic

Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm"

 http://www.ietf.org/rfc/rfc1321.txt?number=1321


2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes

GENLNGOriginalStringPoinerIDI/OY

EV01Suppress Error MessagesIN1=Suppress runtime error message handling. 0=Allow runtime error 

                                message handling.

DTAIError Message IDON

CFGSIDUniqueConfigurationIDOY32 characters string  ( plus string terminator)



2.2Related Tables 

Table Table Description

F3211


2.3Related Business Functions

Source NameFunction Name

B3200600


2.4Processing 


Set default values for variables

If OriginalStringPointerID > zero

Using API retrieve a pointer to Original String 
If  retrieved pointer is not Null

Execute MD5 algorithm (I3201440_MDString) 
Within I3201440_MDString  run following subroutines:

I3201440_MD5Init
I3201440_MD5Update

I3201440_MD5Final

Within  I3201440_MD5Final run:

 I3201440_ProcessField (to translate a long integer into a string)
 Note: do it four times to process whole 128 bit Number (Digest)

   (the procedure have following parameters: variable (passed by reference),
     address of ConfiguredStringID array string and offset index)

Within the procedure we will process 4 bits of  unsigned variable at a time
And we will load  consecutive elements of char array ConfiguredStringID

With ASCII codes (possible characters: 0-9 and A-F)

Null terminate ConfiguredStringID array string

Copy ConfiguredStringID string into UniqueConfigurationID

return (ER_SUCCESS)
Else
Perform logic regarding setting errors

return (ER_ERROR)

End If
End If


Data Structure

D3201440 - BuildUniqueConfigurationID

Parameter NameData ItemData TypeReq/OptI/O/Both
idOriginalStringPointerGENLNGIDOPTNONE

General purpose ID variable.

cSuppressErrorMessageEV01charOPTNONE

An option that specifies the type of processing for an event.

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szUniqueConfigurationIDCFGSIDcharOPTNONE

An identifier that represents a unique configuration. It is generated from an encryption algorithm.  Regardless of the number of segments or 
levels in the configured item, the system always converts the information into a 32-character digest. The digest is always a full 32 characters 
in length, consists of numbers and characters, and does not contain any blanks. You cannot determine the initial value from the digest, and it 
has no significant meaning.

Related Functions

None

Related Tables

None