Skip to content

Commit

Permalink
Make functions static
Browse files Browse the repository at this point in the history
  • Loading branch information
merces committed Apr 20, 2023
1 parent 639f3e9 commit 73c5e2e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Hashes/HiewModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 73c5e2e

Please sign in to comment.