diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-04-09 15:41:35 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-18 19:11:41 (GMT) |
commit | 83f360b98d28e3a34dcabce170e1e4d9577e50d3 (patch) | |
tree | 5f61f628f409d1dbe6388901c9efa20182ebaed3 /Swiften/StringCodecs | |
parent | 40587e704a2a8dfe7d29cc2e28e140f01c9f86bc (diff) | |
download | swift-contrib-83f360b98d28e3a34dcabce170e1e4d9577e50d3.zip swift-contrib-83f360b98d28e3a34dcabce170e1e4d9577e50d3.tar.bz2 |
Fixed tests on windows.
Diffstat (limited to 'Swiften/StringCodecs')
-rw-r--r-- | Swiften/StringCodecs/SHA1.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/StringCodecs/SHA1.cpp b/Swiften/StringCodecs/SHA1.cpp index a78a7b0..2703796 100644 --- a/Swiften/StringCodecs/SHA1.cpp +++ b/Swiften/StringCodecs/SHA1.cpp @@ -185,7 +185,7 @@ SHA1::SHA1() { SHA1& SHA1::update(const std::vector<unsigned char>& input) { std::vector<unsigned char> inputCopy(input); - Update(&context, (boost::uint8_t*) &inputCopy[0], inputCopy.size()); + Update(&context, (boost::uint8_t*) ByteArray::data(inputCopy), inputCopy.size()); return *this; } @@ -193,7 +193,7 @@ std::vector<unsigned char> SHA1::getHash() const { std::vector<unsigned char> digest; digest.resize(20); CTX contextCopy(context); - Final((boost::uint8_t*) &digest[0], &contextCopy); + Final((boost::uint8_t*) ByteArray::data(digest), &contextCopy); return digest; } @@ -202,7 +202,7 @@ ByteArray SHA1::getHash(const ByteArray& input) { Init(&context); std::vector<unsigned char> inputCopy(input.getVector()); - Update(&context, (boost::uint8_t*) &inputCopy[0], inputCopy.size()); + Update(&context, (boost::uint8_t*) ByteArray::data(inputCopy), inputCopy.size()); ByteArray digest; digest.resize(20); |