From 73c5e2e2f069e0efb897a9eab2ee023b119316cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Merc=C3=AAs?= Date: Thu, 20 Apr 2023 14:58:26 -0300 Subject: [PATCH] Make functions static --- Hashes/HiewModule.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Hashes/HiewModule.cpp b/Hashes/HiewModule.cpp index 49b8fb2..ce18637 100644 --- a/Hashes/HiewModule.cpp +++ b/Hashes/HiewModule.cpp @@ -51,7 +51,7 @@ HEMINFO_TAG hemMod = { // Module supporting functions -int ShowHelp(VOID) { +static int ShowHelp(VOID) { static PCHAR HelpText[] = { "This module calculates the MD5, SHA-1, and SHA-256 hashes", "for a given file or block.", @@ -64,16 +64,16 @@ int ShowHelp(VOID) { " F5 - Copy selected hash value to clipboard.", "", "To hash a block of data, first mark a block, then", - "press F11 and load this module", + "press F11 and load this module.", }; - CHAR title[100] = HEM_MODULE_NAME; // In case StringCchPrintfA() fails, we still have a title :) + static CHAR title[100] = HEM_MODULE_NAME; // In case StringCchPrintfA() fails, we still have a title :) StringCchPrintfA(title, _countof(title), "%s %d.%d", HEM_MODULE_NAME, HEM_MODULE_VERSION_MAJOR, HEM_MODULE_VERSION_MINOR); return HiewGate_Window(title, HelpText, _countof(HelpText), 60, NULL, NULL); } -BOOL SendTextToClipboard(const PCHAR text) { +static BOOL SendTextToClipboard(const PCHAR text) { if (!text) return FALSE; @@ -117,7 +117,7 @@ BOOL SendTextToClipboard(const PCHAR text) { return TRUE; } -BOOL CalculateMd5Hash(PVOID buffer, ULONG bufferLen, PUCHAR md5Hash, ULONG* md5HashSize) { +static BOOL CalculateMd5Hash(PVOID buffer, ULONG bufferLen, PUCHAR md5Hash, ULONG* md5HashSize) { BOOL result = FALSE; BCRYPT_ALG_HANDLE hMd5Alg; @@ -152,7 +152,7 @@ BOOL CalculateMd5Hash(PVOID buffer, ULONG bufferLen, PUCHAR md5Hash, ULONG* md5H return TRUE; } -BOOL CalculateSha1Hash(PVOID buffer, ULONG bufferLen, PUCHAR sha1Hash, ULONG* sha1HashSize) { +static BOOL CalculateSha1Hash(PVOID buffer, ULONG bufferLen, PUCHAR sha1Hash, ULONG* sha1HashSize) { BOOL result = FALSE; BCRYPT_ALG_HANDLE hSha1Alg; @@ -187,7 +187,7 @@ BOOL CalculateSha1Hash(PVOID buffer, ULONG bufferLen, PUCHAR sha1Hash, ULONG* sh return TRUE; } -BOOL CalculateSha256Hash(PVOID buffer, ULONG bufferLen, PUCHAR sha256Hash, ULONG* sha256HashSize) { +static BOOL CalculateSha256Hash(PVOID buffer, ULONG bufferLen, PUCHAR sha256Hash, ULONG* sha256HashSize) { BOOL result = FALSE; BCRYPT_ALG_HANDLE hSha256Alg;