summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StringCodecs/MD5.h')
-rw-r--r--Swiften/StringCodecs/MD5.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/Swiften/StringCodecs/MD5.h b/Swiften/StringCodecs/MD5.h
index b896529..09473c2 100644
--- a/Swiften/StringCodecs/MD5.h
+++ b/Swiften/StringCodecs/MD5.h
@@ -6,11 +6,24 @@
#pragma once
+#include <Swiften/Base/ByteArray.h>
+#include <Swiften/Base/SafeByteArray.h>
+
namespace Swift {
- class ByteArray;
+ struct md5_state_s;
class MD5 {
public:
+ MD5();
+ ~MD5();
+
+ MD5& update(const std::vector<unsigned char>& data);
+ std::vector<unsigned char> getHash();
+
static ByteArray getHash(const ByteArray& data);
+ static ByteArray getHash(const SafeByteArray& data);
+
+ private:
+ md5_state_s* state;
};
}