Skip to content

Commit 4977bd5

Browse files
committed
Revert "Fix MD5 checksum for empty buffers"
This reverts commit 4b15cc3.
1 parent e1a253c commit 4977bd5

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Shared/sdk/CChecksum.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ class CChecksum
6666
{
6767
CChecksum result;
6868
result.ulCRC = CRCGenerator::GetCRCFromBuffer(cpBuffer, ulLength);
69-
70-
if (result.ulCRC != 0)
71-
CMD5Hasher().Calculate(cpBuffer, ulLength, result.md5);
72-
69+
CMD5Hasher().Calculate(cpBuffer, ulLength, result.md5);
7370
return result;
7471
}
7572

Shared/sdk/SharedUtil.Hash.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ namespace SharedUtil
145145

146146
void CMD5Hasher::Update(unsigned char* input, unsigned int input_length)
147147
{
148-
if (input_length == 0)
149-
return;
150-
151148
// CRYPT_START
152149
unsigned int input_index, buffer_index;
153150
unsigned int buffer_space; // how much space is left in buffer

0 commit comments

Comments
 (0)