summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/sha1.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/msn/sha1.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn/sha1.cpp')
-rw-r--r--kopete/protocols/msn/sha1.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/kopete/protocols/msn/sha1.cpp b/kopete/protocols/msn/sha1.cpp
index 84ad13ad..0774cede 100644
--- a/kopete/protocols/msn/sha1.cpp
+++ b/kopete/protocols/msn/sha1.cpp
@@ -159,10 +159,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context)
memset(&finalcount, 0, 8);
}
-QByteArray SHA1::hash(const QByteArray &a)
+TQByteArray SHA1::hash(const TQByteArray &a)
{
SHA1_CONTEXT context;
- QByteArray b(20);
+ TQByteArray b(20);
SHA1 s;
s.init(&context);
@@ -171,19 +171,19 @@ QByteArray SHA1::hash(const QByteArray &a)
return b;
}
-QByteArray SHA1::hashString(const QCString &cs)
+TQByteArray SHA1::hashString(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return SHA1::hash(a);
}
-QString SHA1::digest(const QString &in)
+TQString SHA1::digest(const TQString &in)
{
- QByteArray a = SHA1::hashString(in.utf8());
- QString out;
+ TQByteArray a = SHA1::hashString(in.utf8());
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}