Add BLAKE3 hash function

This commit is contained in:
Tino Reichardt
2021-04-06 19:35:46 +02:00
parent f090495d25
commit 576c5df947
9 changed files with 1097 additions and 1 deletions

View File

@@ -237,6 +237,7 @@ static const CHashCommand g_HashCommands[] =
{ CZipContextMenu::kHash_SHA384, "SHA-384", "SHA384" },
{ CZipContextMenu::kHash_SHA512, "SHA-512", "SHA512" },
{ CZipContextMenu::kHash_BLAKE2sp, "BLAKE2sp", "BLAKE2sp" },
{ CZipContextMenu::kHash_BLAKE3, "BLAKE3", "BLAKE3" },
{ CZipContextMenu::kHash_All, "*", "*" }
};
@@ -951,6 +952,7 @@ STDMETHODIMP CZipContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO commandInfo)
case kHash_SHA384:
case kHash_SHA512:
case kHash_BLAKE2sp:
case kHash_BLAKE3:
case kHash_All:
{
for (unsigned i = 0; i < ARRAY_SIZE(g_HashCommands); i++)

View File

@@ -44,6 +44,7 @@ public:
kHash_SHA384,
kHash_SHA512,
kHash_BLAKE2sp,
kHash_BLAKE3,
kHash_All
};

View File

@@ -588,7 +588,8 @@ bool ExecuteFileCommand(int id)
case IDM_SHA384: g_App.CalculateCrc("SHA384"); break;
case IDM_SHA512: g_App.CalculateCrc("SHA512"); break;
case IDM_BLAKE2sp: g_App.CalculateCrc("BLAKE2sp"); break;
case IDM_BLAKE3: g_App.CalculateCrc("BLAKE3"); break;
case IDM_DIFF: g_App.DiffFiles(); break;
case IDM_SPLIT: g_App.Split(); break;
case IDM_COMBINE: g_App.Combine(); break;

View File

@@ -33,6 +33,7 @@
#define IDM_SHA384 111
#define IDM_SHA512 112
#define IDM_BLAKE2sp 113
#define IDM_BLAKE3 114
#define IDM_OPEN 540
#define IDM_OPEN_INSIDE 541

View File

@@ -50,6 +50,7 @@ BEGIN
MENUITEM "SHA-384", IDM_SHA384
MENUITEM "SHA-512", IDM_SHA512
MENUITEM "Blake2sp", IDM_BLAKE2sp
MENUITEM "Blake3", IDM_BLAKE3
MENUITEM "*", IDM_HASH_ALL
END
MENUITEM "Di&ff", IDM_DIFF