summaryrefslogtreecommitdiffstats
path: root/kbiff/kbiffcrypt.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-07-02 19:34:37 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-07-02 19:34:37 +0200
commit979e7a713aabb63ffbe53b6a42a90e87bf4d1969 (patch)
treed81fe703502efa28fdcb3a10a9310af33ddf581b /kbiff/kbiffcrypt.cpp
parent9be78eabfff24f317148c216f609e4d4778e3d58 (diff)
downloadkbiff-979e7a713aabb63ffbe53b6a42a90e87bf4d1969.tar.gz
kbiff-979e7a713aabb63ffbe53b6a42a90e87bf4d1969.zip
Initial TQt conversion
Diffstat (limited to 'kbiff/kbiffcrypt.cpp')
-rw-r--r--kbiff/kbiffcrypt.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/kbiff/kbiffcrypt.cpp b/kbiff/kbiffcrypt.cpp
index 66ce0b0..1634733 100644
--- a/kbiff/kbiffcrypt.cpp
+++ b/kbiff/kbiffcrypt.cpp
@@ -10,28 +10,28 @@
#include "kbiffcrypt.h"
#include <kmdcodec.h>
-#include <qcstring.h>
+#include <ntqcstring.h>
-QString KBiffCrypt::hmac_md5(const QString& text, const QString& k)
+TQString KBiffCrypt::hmac_md5(const TQString& text, const TQString& k)
{
// If the original key is too long, the new key will be a hash of
// the original key. Then the new key might have NULL bytes in it,
- // so we can't use QCString
- QByteArray key = (QByteArray)k.utf8();
+ // so we can't use TQCString
+ TQByteArray key = (TQByteArray)k.utf8();
KMD5 context; // for calculating MD5 sums
KMD5::Digest digest; // intermediate storage for MD5 sums
// inner and outer padding (key XORd with ipad and opad, respectively)
- QByteArray k_ipad(64);
- QByteArray k_opad(64);
+ TQByteArray k_ipad(64);
+ TQByteArray k_opad(64);
// if key is longer than 64 bytes reset it to key=MD5(key)
if (key.size() > 64) {
- // cast to a QCString because we don't want to hash the
+ // cast to a TQCString because we don't want to hash the
// trailing NULL byte
- KMD5 tctx((QCString)key);
+ KMD5 tctx((TQCString)key);
key.duplicate((char*)tctx.rawDigest(), 16);
}