summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h')
-rw-r--r--Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h
index 64f4b5f..7b4e124 100644
--- a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h
+++ b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h
@@ -5,17 +5,25 @@
*/
+/*
+ * Copyright (c) 2013 Remko Tronçon
+ * Licensed under the GNU General Public License.
+ * See the COPYING file for more information.
+ */
+
#pragma once
+#include <string>
+
#include <Swiften/Base/ByteArray.h>
#include <Swiften/Base/SafeByteArray.h>
+#include <boost/optional.hpp>
namespace Swift {
-
-class MD5;
-class SHA1;
+ class Hash;
+ class CryptoProvider;
class IncrementalBytestreamHashCalculator {
public:
- IncrementalBytestreamHashCalculator(bool doMD5, bool doSHA1);
+ IncrementalBytestreamHashCalculator(bool doMD5, bool doSHA1, CryptoProvider* crypto);
~IncrementalBytestreamHashCalculator();
@@ -27,6 +35,8 @@ public:
private:
- MD5* md5Hasher;
- SHA1* sha1Hasher;
+ Hash* md5Hasher;
+ Hash* sha1Hasher;
+ boost::optional<std::string> md5Hash;
+ boost::optional<std::string> sha1Hash;
};