CascLib API Reference

CascAddEncryptionKey

Description


  bool WINAPI CascAddEncryptionKey(
      HANDLE hStorage,                // Handle to an open storage
      ULONGLONG KeyName,              // "Name" of the key
      LPBYTE Key                      // 16-byte key
      );

Function CascAddEncryptionKey inserts an additional encryption key into they storage structure. Useful when you discover a new Casc encyption key and want to use without update of CascLib.

Parameters

hStorage [in]
Handle to an open CASC storage.
KeyName [in]
Identifier of the new key being added.
Key [in]
16-byte data of the key.

Return Value

On success, the function returns true.
On failure, the function returns false and GetLastError() returns the error code.