diff options
Diffstat (limited to 'Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h')
-rw-r--r-- | Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h index bc4ebf9..4477ec1 100644 --- a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h +++ b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2013-2014 Isode Limited. + * Copyright (c) 2013-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -14,33 +14,34 @@ #include <string> +#include <boost/optional.hpp> + #include <Swiften/Base/ByteArray.h> #include <Swiften/Base/SafeByteArray.h> -#include <boost/optional.hpp> namespace Swift { - class Hash; - class CryptoProvider; + class Hash; + class CryptoProvider; - class IncrementalBytestreamHashCalculator { - public: - IncrementalBytestreamHashCalculator(bool doMD5, bool doSHA1, CryptoProvider* crypto); - ~IncrementalBytestreamHashCalculator(); + class IncrementalBytestreamHashCalculator { + public: + IncrementalBytestreamHashCalculator(bool doMD5, bool doSHA1, CryptoProvider* crypto); + ~IncrementalBytestreamHashCalculator(); - void feedData(const ByteArray& data); - //void feedData(const SafeByteArray& data); + void feedData(const ByteArray& data); + //void feedData(const SafeByteArray& data); - ByteArray getSHA1Hash(); - ByteArray getMD5Hash(); + ByteArray getSHA1Hash(); + ByteArray getMD5Hash(); - std::string getSHA1String(); - std::string getMD5String(); + std::string getSHA1String(); + std::string getMD5String(); - private: - Hash* md5Hasher; - Hash* sha1Hasher; - boost::optional<ByteArray> md5Hash; - boost::optional<ByteArray> sha1Hash; - }; + private: + Hash* md5Hasher; + Hash* sha1Hasher; + boost::optional<ByteArray> md5Hash; + boost::optional<ByteArray> sha1Hash; + }; } |