30 #ifndef ___IKPUTILITIES_H___
31 #define ___IKPUTILITIES_H___
35 #include "../../SysDefEx.h"
43 struct KP_DECL_INTERFACE("9700114E-9178-4337-A26F-34A6DA91FBB4")
IKpUtilities :
47 STDMETHOD(ShowFileDialog)(BOOL bOpenMode, LPCTSTR lpSuffix, LPTSTR lpStoreBuf,
51 STDMETHOD_(
char*, UnicodeToMultiByte)(
const WCHAR* lpwString) = 0;
53 STDMETHOD_(WCHAR*, MultiByteToUnicode)(
const char* lpString) = 0;
56 STDMETHOD_(
UTF8_BYTE*, StringToUTF8)(LPCTSTR lpSourceString) = 0;
57 STDMETHOD_(DWORD, UTF8NumChars)(
const UTF8_BYTE* pUTF8String) = 0;
58 STDMETHOD_(DWORD, UTF8BytesNeeded)(LPCTSTR lpString) = 0;
60 STDMETHOD_(LPTSTR, UTF8ToString)(
const UTF8_BYTE* pUTF8String) = 0;
61 STDMETHOD_(BOOL, IsUTF8String)(
const UTF8_BYTE* pUTF8String) = 0;
63 STDMETHOD(UuidToString)(
const BYTE* pUuid, LPTSTR lpOutBuf) = 0;
64 STDMETHOD(StringToUuid)(LPCTSTR lpSource, BYTE* pUuid) = 0;
66 STDMETHOD_(INT, ShellOpenLocalFile)(LPCTSTR lpFile, INT nMode) = 0;
67 STDMETHOD(OpenUrl)(LPCTSTR lpURL, HWND hParent) = 0;
68 STDMETHOD(OpenAppHelp)(LPCTSTR lpTopicFile) = 0;
70 STDMETHOD(Base64Encode)(
const BYTE* pbIn, DWORD cbInLen, BYTE* pbOut, DWORD* pcbOutLen) = 0;
71 STDMETHOD(Base64Decode)(
const BYTE* pbIn, DWORD cbInLen, BYTE* pbOut, DWORD* pcbOutLen) = 0;
73 STDMETHOD(GetApplicationDirectory)(LPTSTR lpStoreBuf, DWORD dwBufLen,
74 BOOL bFilterSpecial, BOOL bMakeURL) = 0;
77 STDMETHOD_(LPTSTR, MakeRelativePath)(LPCTSTR lpBaseFile, LPCTSTR lpTargetFile) = 0;
80 STDMETHOD_(LPTSTR, GetShortestAbsolutePath)(LPCTSTR lpFilePath) = 0;
82 STDMETHOD_(BOOL, IsAbsolutePath)(LPCTSTR lpPath) = 0;
96 STDMETHOD_(BOOL, ValidatePath)(LPCTSTR lpPath, DWORD dwOptions) = 0;
99 STDMETHOD_(LPTSTR, GetQuotedPath)(LPCTSTR lpPath) = 0;
106 STDMETHOD(CreateDirectoryTree)(LPCTSTR lpDirPath, DWORD dwOptions) = 0;
110 STDMETHOD(FlushStorageBuffers)(LPCTSTR lpFileOnStorage, BOOL bOnlyIfRemovable) = 0;
113 STDMETHOD(SecureDeleteFile)(LPCTSTR lpFilePath) = 0;
115 STDMETHOD(WriteFile)(LPCTSTR lpFilePath,
const BYTE* pData, DWORD dwDataSize) = 0;
117 STDMETHOD_(INT, CompareTimes)(
const PW_TIME* pTime1,
const PW_TIME* pTime2) = 0;
119 STDMETHOD_(DWORD, EstimatePasswordBits)(LPCTSTR lpPassword) = 0;
121 STDMETHOD_(BOOL, IsTANEntry)(
const PW_ENTRY* pEntry) = 0;
123 STDMETHOD(HashFileSHA256)(LPCTSTR lpFile, BYTE* pHashBuf) = 0;
132 STDMETHOD(SHA256CreateContext)(
void** pOutNewContext) = 0;
139 STDMETHOD(SHA256Init)(
void* pContext) = 0;
147 STDMETHOD(SHA256Hash)(
void* pContext,
const BYTE* pData, DWORD dwDataLength) = 0;
155 STDMETHOD(SHA256Final)(
void* pContext, BYTE* pOutHashBuf) = 0;
163 STDMETHOD(EncryptMemory)(BYTE* pbBuf, DWORD dwBufLen,
const BYTE* pbKey, DWORD dwKeyLen) = 0;
167 STDMETHOD(DecryptMemory)(BYTE* pbBuf, DWORD dwBufLen,
const BYTE* pbKey, DWORD dwKeyLen) = 0;
172 #endif // ___IKPUTILITIES_H___