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

Function CascAddEncryptionKey

src/External/CascLib/src/CascDecrypt.cpp:764–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764bool WINAPI CascAddEncryptionKey(HANDLE hStorage, ULONGLONG KeyName, LPBYTE Key)
765{
766 TCascStorage * hs;
767
768 // Validate the storage handle
769 hs = TCascStorage::IsValid(hStorage);
770 if(hs == NULL)
771 {
772 SetCascError(ERROR_INVALID_HANDLE);
773 return false;
774 }
775
776 // Add the key to the map and return result
777 return hs->KeyMap.AddKey(KeyName, Key);
778}
779
780bool WINAPI CascAddStringEncryptionKey(HANDLE hStorage, ULONGLONG KeyName, LPCSTR szKey)
781{

Callers 2

CascImportKeysFromStringFunction · 0.85

Calls 2

SetCascErrorFunction · 0.85
AddKeyMethod · 0.80

Tested by

no test coverage detected