ArrayIndex DynamicHashArray::CalculateHash(AccountNumber p_Key) { crc32 CRC; unsigned long Result; unsigned long HashNumber = 0; unsigned long TempHash = 0; ArrayIndex KeyLength; KeyLength = p_Key.GetSize(); CRC.processBuffer((unsigned char*)p_Key.GetDataAddress(),KeyLength); HashNumber = CRC.get_result().crc; Result = HashNumber & (m_CurrentMaxSlotCount-1); if (Result >= m_CurrentSlotCount) Result -= m_CurrentMaxSlotCount/2; return (ArrayIndex)Result; }