summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmd5.cpp
diff options
context:
space:
mode:
authorChristian Goetze (CG) <cg@lindenlab.com>2010-08-02 15:57:01 -0700
committerChristian Goetze (CG) <cg@lindenlab.com>2010-08-02 15:57:01 -0700
commit4f6e814eaa7ae5cfc10e4e7d1f22e53be395a2f4 (patch)
treebe554f9f22996e00dada6da67f7e77eb0502b0f5 /indra/llcommon/llmd5.cpp
parentf423a69864c40f760c1c7e64a2e544fd1dba77fb (diff)
parent15247f086989a43881d79c1ee5416bb00721eb68 (diff)
Fix the reversion imported from viewer-hotfix via: "hg pull -r 1c95812ba38b ../viewer-public" - reviewed by richard
Diffstat (limited to 'indra/llcommon/llmd5.cpp')
-rw-r--r--indra/llcommon/llmd5.cpp37
1 files changed, 13 insertions, 24 deletions
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index cc73c3e45c..da9cb94e13 100644
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -171,6 +171,11 @@ void LLMD5::update(FILE* file){
}
+
+
+
+
+
// MD5 update for istreams.
// Like update for files; see above.
@@ -187,10 +192,9 @@ void LLMD5::update(std::istream& stream){
}
-void LLMD5::update(const std::string& s)
-{
- update((unsigned char *)s.c_str(),s.length());
-}
+
+
+
// MD5 finalization. Ends an MD5 message-digest operation, writing the
// the message digest and zeroizing the context.
@@ -273,7 +277,7 @@ LLMD5::LLMD5(const unsigned char *s)
finalize();
}
-void LLMD5::raw_digest(unsigned char *s) const
+void LLMD5::raw_digest(unsigned char *s)
{
if (!finalized)
{
@@ -289,7 +293,7 @@ void LLMD5::raw_digest(unsigned char *s) const
-void LLMD5::hex_digest(char *s) const
+void LLMD5::hex_digest(char *s)
{
int i;
@@ -315,7 +319,6 @@ void LLMD5::hex_digest(char *s) const
-
std::ostream& operator<<(std::ostream &stream, LLMD5 context)
{
char s[33]; /* Flawfinder: ignore */
@@ -324,25 +327,13 @@ std::ostream& operator<<(std::ostream &stream, LLMD5 context)
return stream;
}
-bool operator==(const LLMD5& a, const LLMD5& b)
-{
- unsigned char a_guts[16];
- unsigned char b_guts[16];
- a.raw_digest(a_guts);
- b.raw_digest(b_guts);
- if (memcmp(a_guts,b_guts,16)==0)
- return true;
- else
- return false;
-}
-bool operator!=(const LLMD5& a, const LLMD5& b)
-{
- return !(a==b);
-}
+
// PRIVATE METHODS:
+
+
void LLMD5::init(){
finalized=0; // we just started!
@@ -540,5 +531,3 @@ void LLMD5::decode (uint4 *output, const uint1 *input, const uint4 len){
output[i] = ((uint4)input[j]) | (((uint4)input[j+1]) << 8) |
(((uint4)input[j+2]) << 16) | (((uint4)input[j+3]) << 24);
}
-
-