5.5 Block Signature

The following is the algorithm to calculate the signature of a block. The signature is calculated by first obtaining the DWORD XOR result between the absolute file offset of the block and its BID. The WORD signature is then obtained by obtaining the XOR result between the higher and lower 16 bits of the DWORD obtained previously.

 WORD ComputeSig(IB ib, BID bid)
 {
    ib ^= bid;
    return(WORD(WORD(ib >> 16) ^ WORD(ib)));
 }