diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-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/jabber/libiris/cutestuff/util/sha1.cpp')
-rw-r--r-- | kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp index f4ad554f..a3195d89 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp @@ -161,10 +161,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); @@ -173,19 +173,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); } |