From e2a9429979aecbdf828441206a0ec5ce4eadc16c Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Sat, 23 Sep 2023 07:00:33 +0200 Subject: SHA256 is available only in test program --- test/StormTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index c25ec84..035642f 100755 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -44,6 +44,9 @@ // Artificial flag for not reporting open failure #define MPQ_OPEN_DONT_REPORT_FAILURE 0x80000000 +// Size of SHA256, in bytes +#define SHA256_DIGEST_SIZE 0x20 + typedef DWORD (*FS_SEARCH_CALLBACK)(LPCTSTR szFullPath, void * lpContext); typedef enum _EXTRA_TYPE @@ -838,6 +841,9 @@ static DWORD InitializeMpqDirectory(TCHAR * argv[], int argc) LPCTSTR szWhereFrom = _T("default"); LPCTSTR szDirName = WORK_PATH_ROOT; + // Make sure SHA256 works in test program + register_hash(&sha256_desc); + // Retrieve the first argument if(argc > 1 && argv[1] != NULL) { -- cgit v1.2.3