MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / FindKey

Method FindKey

src/External/CascLib/src/CascDecrypt.cpp:695–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695LPBYTE 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
713bool CASC_KEY_MAP::AddKey(ULONGLONG KeyName, LPBYTE Key)
714{

Callers 2

CascFindEncryptionKeyFunction · 0.80
CascDecryptFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected