summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StringCodecs/SHA1.cpp')
-rw-r--r--Swiften/StringCodecs/SHA1.cpp6
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);