| 693 | } |
| 694 | |
| 695 | LPBYTE CASC_KEY_MAP::FindKey(ULONGLONG KeyName) |
| 696 | { |
| 697 | PCASC_ENCRYPTION_KEY2 pKeyItem = NULL; |
| 698 | size_t HashIndex = (size_t)(KeyName & CASC_KEY_TABLE_MASK); |
| 699 | |
| 700 | // Check the key chain beginning at the hash table |
| 701 | pKeyItem = (PCASC_ENCRYPTION_KEY2)HashTable[HashIndex]; |
| 702 | while(pKeyItem != NULL) |
| 703 | { |
| 704 | if(pKeyItem->KeyName == KeyName) |
| 705 | return pKeyItem->Key; |
| 706 | pKeyItem = pKeyItem->pNext; |
| 707 | } |
| 708 | |
| 709 | // Not found |
| 710 | return NULL; |
| 711 | } |
| 712 | |
| 713 | bool CASC_KEY_MAP::AddKey(ULONGLONG KeyName, LPBYTE Key) |
| 714 | { |
no outgoing calls
no test coverage detected