aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2023-09-23 07:00:33 +0200
committerLadislav Zezula <zezula@volny.cz>2023-09-23 07:00:33 +0200
commite2a9429979aecbdf828441206a0ec5ce4eadc16c (patch)
tree7c5bf64745b4ac7a25a8e36726cb2059be91fd35 /test
parentcb56fff1a5aa1fd3b69c92c38dd07aec4ae28dec (diff)
SHA256 is available only in test program
Diffstat (limited to 'test')
-rwxr-xr-xtest/StormTest.cpp6
1 files changed, 6 insertions, 0 deletions
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)
{