summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-12 14:33:13 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-12 14:33:13 (GMT)
commit97924625aa344acf1f8aa2087c5996f20641ce51 (patch)
treeb1347e8f9e86fe028ba9e08e658d3777998aa748 /Swiften/StringCodecs
parent6e58eccb82f8f801143c437d9bcbf0ebbf9ed979 (diff)
downloadswift-contrib-97924625aa344acf1f8aa2087c5996f20641ce51.zip
swift-contrib-97924625aa344acf1f8aa2087c5996f20641ce51.tar.bz2
Simplified HMAC-SHA1 a bit.
Diffstat (limited to 'Swiften/StringCodecs')
-rw-r--r--Swiften/StringCodecs/HMACSHA1.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Swiften/StringCodecs/HMACSHA1.cpp b/Swiften/StringCodecs/HMACSHA1.cpp
index 4ce46fc..0cea08f 100644
--- a/Swiften/StringCodecs/HMACSHA1.cpp
+++ b/Swiften/StringCodecs/HMACSHA1.cpp
@@ -20,10 +20,7 @@ ByteArray HMACSHA1::getResult(const ByteArray& key, const ByteArray& data) {
// Create the padded key
ByteArray paddedKey(key);
- paddedKey.resize(B);
- for (unsigned int i = key.getSize(); i < paddedKey.getSize(); ++i) {
- paddedKey[i] = 0x0;
- }
+ paddedKey.resize(B, 0x0);
// Create the first value
ByteArray x(paddedKey);