summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h')
-rw-r--r--Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h
index bb6b441..bc4ebf9 100644
--- a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h
+++ b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h
@@ -2,13 +2,13 @@
* Copyright (c) 2011 Tobias Markmann
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2014 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
@@ -27,17 +27,20 @@ namespace Swift {
IncrementalBytestreamHashCalculator(bool doMD5, bool doSHA1, CryptoProvider* crypto);
~IncrementalBytestreamHashCalculator();
void feedData(const ByteArray& data);
//void feedData(const SafeByteArray& data);
+ ByteArray getSHA1Hash();
+ ByteArray getMD5Hash();
+
std::string getSHA1String();
std::string getMD5String();
private:
Hash* md5Hasher;
Hash* sha1Hasher;
- boost::optional<std::string> md5Hash;
- boost::optional<std::string> sha1Hash;
+ boost::optional<ByteArray> md5Hash;
+ boost::optional<ByteArray> sha1Hash;
};
}