diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp')
-rw-r--r-- | kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp index 4c8307cb..1b1dc1c7 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp @@ -104,8 +104,8 @@ static void ensureEndian() * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ -typedef Q_UINT8 md5_byte_t; /* 8-bit byte */ -typedef Q_UINT32 md5_word_t; /* 32-bit word */ +typedef TQ_UINT8 md5_byte_t; /* 8-bit byte */ +typedef TQ_UINT32 md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { @@ -437,14 +437,14 @@ md5_finish(md5_state_t *pms, md5_byte_t digest[16]) struct SHA1_CONTEXT { - Q_UINT32 state[5]; - Q_UINT32 count[2]; + TQ_UINT32 state[5]; + TQ_UINT32 count[2]; unsigned char buffer[64]; }; typedef union { unsigned char c[64]; - Q_UINT32 l[16]; + TQ_UINT32 l[16]; } CHAR64LONG16; class SHA1Context : public QCA_HashContext @@ -480,7 +480,7 @@ public: *out = b; } - unsigned long blk0(Q_UINT32 i) + unsigned long blk0(TQ_UINT32 i) { if(bigEndian) return block->l[i]; @@ -489,9 +489,9 @@ public: } // Hash a single 512-bit block. This is the core of the algorithm. - void transform(Q_UINT32 state[5], unsigned char buffer[64]) + void transform(TQ_UINT32 state[5], unsigned char buffer[64]) { - Q_UINT32 a, b, c, d, e; + TQ_UINT32 a, b, c, d, e; block = (CHAR64LONG16*)buffer; @@ -548,9 +548,9 @@ public: } // Run your data through this - void sha1_update(SHA1_CONTEXT* context, unsigned char* data, Q_UINT32 len) + void sha1_update(SHA1_CONTEXT* context, unsigned char* data, TQ_UINT32 len) { - Q_UINT32 i, j; + TQ_UINT32 i, j; j = (context->count[0] >> 3) & 63; if((context->count[0] += len << 3) < (len << 3)) @@ -573,7 +573,7 @@ public: // Add padding and return the message digest void sha1_final(unsigned char digest[20], SHA1_CONTEXT* context) { - Q_UINT32 i, j; + TQ_UINT32 i, j; unsigned char finalcount[8]; for (i = 0; i < 8; i++) { |