| 762 | } |
| 763 | |
| 764 | bool 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 | |
| 780 | bool WINAPI CascAddStringEncryptionKey(HANDLE hStorage, ULONGLONG KeyName, LPCSTR szKey) |
| 781 | { |
no test coverage detected