|
|
|
@ -119,6 +119,7 @@ plMD5Checksum::plMD5Checksum()
|
|
|
|
|
|
|
|
|
|
plMD5Checksum::plMD5Checksum(const plMD5Checksum& rhs) |
|
|
|
|
{ |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
memcpy(fChecksum, rhs.fChecksum, sizeof(fChecksum)); |
|
|
|
|
fValid = rhs.fValid; |
|
|
|
|
} |
|
|
|
@ -135,6 +136,7 @@ plMD5Checksum::plMD5Checksum( hsStream* stream )
|
|
|
|
|
|
|
|
|
|
void plMD5Checksum::Clear() |
|
|
|
|
{ |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
memset(fChecksum, 0, sizeof(fChecksum)); |
|
|
|
|
fValid = false; |
|
|
|
|
} |
|
|
|
@ -182,6 +184,7 @@ void plMD5Checksum::Finish()
|
|
|
|
|
{ |
|
|
|
|
MD5_Final(fChecksum, &fContext); |
|
|
|
|
fValid = true; |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char* plMD5Checksum::GetAsHexString() const |
|
|
|
@ -245,6 +248,7 @@ plSHAChecksum::plSHAChecksum()
|
|
|
|
|
|
|
|
|
|
plSHAChecksum::plSHAChecksum(const plSHAChecksum& rhs) |
|
|
|
|
{ |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
memcpy(fChecksum, rhs.fChecksum, sizeof(fChecksum)); |
|
|
|
|
fValid = rhs.fValid; |
|
|
|
|
} |
|
|
|
@ -261,6 +265,7 @@ plSHAChecksum::plSHAChecksum(hsStream* stream)
|
|
|
|
|
|
|
|
|
|
void plSHAChecksum::Clear() |
|
|
|
|
{ |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
memset(fChecksum, 0, sizeof(fChecksum)); |
|
|
|
|
fValid = false; |
|
|
|
|
} |
|
|
|
@ -310,6 +315,7 @@ void plSHAChecksum::Finish()
|
|
|
|
|
{ |
|
|
|
|
SHA_Final(fChecksum, &fContext); |
|
|
|
|
fValid = true; |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char* plSHAChecksum::GetAsHexString() const |
|
|
|
@ -371,6 +377,7 @@ plSHA1Checksum::plSHA1Checksum()
|
|
|
|
|
|
|
|
|
|
plSHA1Checksum::plSHA1Checksum(const plSHA1Checksum& rhs) |
|
|
|
|
{ |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
memcpy(fChecksum, rhs.fChecksum, sizeof(fChecksum)); |
|
|
|
|
fValid = rhs.fValid; |
|
|
|
|
} |
|
|
|
@ -389,6 +396,7 @@ void plSHA1Checksum::Clear()
|
|
|
|
|
{ |
|
|
|
|
memset(fChecksum, 0, sizeof(fChecksum)); |
|
|
|
|
fValid = false; |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void plSHA1Checksum::CalcFromFile(const plFileName& fileName) |
|
|
|
@ -436,6 +444,7 @@ void plSHA1Checksum::Finish()
|
|
|
|
|
{ |
|
|
|
|
SHA1_Final(fChecksum, &fContext); |
|
|
|
|
fValid = true; |
|
|
|
|
memset(&fContext, 0, sizeof(fContext)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char* plSHA1Checksum::GetAsHexString() const |
|
|
|
|