2.3.3 RDN Hash Computation

 The server creates the RDN hash value, which it stores in the ulSerial field of the OAB_HDR structure of the Browse file, as specified in section 2.3.1, by incorporating the RDN value of each OAB record into a single value. The following steps produce the RDN hash value:

  1. Begin with a 4-byte integer value of 0x00000000; this is the current hash value when processing the first OAB record.

  2. Process the OAB records in Browse-file order. See section 2.3 for an overview of the Browse file and the definition of Browse-file order. For each record in the OAB, perform steps 3 through 5.

  3. Get the RDN value of the OAB record. The RDN value is the value that the server stores in the acKey field of the RDN2_REC structure of the RDN Index file. For more details, see section 2.4.2. Pad the RDN value with null characters (append null characters to the end of the RDN string) to align it to a 4-byte boundary. The resulting value is a series of 4-byte values, each of which is treated as a little-endian integer.

  4. XOR all of the 4-byte integers together with the current hash value, which is 0x00000000 for the first record. For each subsequent record, the current hash value is the result of the previous iteration.

  5. Take the resulting 4-byte value and shift it left by 1 bit, rotating the high-order bit to the low-order bit. The resulting value is now the current hash value. Repeat steps 3 through 5 to process all records, and then move on to step 6.

  6. After processing all OAB records, the current hash value of the last iteration is the RDN hash value.