Skip to content

Commit

Permalink
Add 7-Zip Hasher interface definitions to NanaZip.Specification.Seven…
Browse files Browse the repository at this point in the history
…Zip.
  • Loading branch information
MouriNaruto committed Feb 2, 2024
1 parent 00a5dff commit a6f2eb9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions NanaZip.Specification/NanaZip.Specification.SevenZip.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,43 @@
#ifndef NANAZIP_SPECIFICATION_SEVENZIP
#define NANAZIP_SPECIFICATION_SEVENZIP

#include <Windows.h>

/* 7-Zip Interface GUID Format: 23170F69-40C1-278A-0000-00yy00xx0000 */

MIDL_INTERFACE("23170F69-40C1-278A-0000-000400C00000")
IHasher : public IUnknown
{
public:
virtual void STDMETHODCALLTYPE Init() = 0;

virtual void STDMETHODCALLTYPE Update(
_In_ LPCVOID Data,
_In_ UINT32 Size) = 0;

virtual void STDMETHODCALLTYPE Final(
_Out_ PBYTE Digest) = 0;

virtual UINT32 STDMETHODCALLTYPE GetDigestSize() = 0;
};

MIDL_INTERFACE("23170F69-40C1-278A-0000-000400C10000")
IHashers: public IUnknown
{
public:
virtual UINT32 STDMETHODCALLTYPE GetNumHashers() = 0;

virtual HRESULT STDMETHODCALLTYPE GetHasherProp(
_In_ UINT32 Index,
_In_ PROPID PropID,
_Out_ LPPROPVARIANT Value) = 0;

virtual HRESULT STDMETHODCALLTYPE CreateHasher(
_In_ UINT32 Index,
_Out_ IHasher** Hasher) = 0;
};

EXTERN_C HRESULT WINAPI GetHashers(
_Out_ IHashers** Hashers);

#endif /* !NANAZIP_SPECIFICATION_SEVENZIP */

0 comments on commit a6f2eb9

Please sign in to comment.