summaryrefslogtreecommitdiffstats
path: root/kio/misc/kntlm/des.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kio/misc/kntlm/des.cpp
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/misc/kntlm/des.cpp')
-rw-r--r--kio/misc/kntlm/des.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kio/misc/kntlm/des.cpp b/kio/misc/kntlm/des.cpp
index b6683ac34..e1029a4ca 100644
--- a/kio/misc/kntlm/des.cpp
+++ b/kio/misc/kntlm/des.cpp
@@ -25,7 +25,7 @@ static void permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *ou
static void perminit_ip (DES_KEY * key);
static void spinit (DES_KEY * key);
static void perminit_fp (DES_KEY * key);
-static Q_UINT32 f (DES_KEY * key, Q_UINT32 r, char *subkey);
+static TQ_UINT32 f (DES_KEY * key, TQ_UINT32 r, char *subkey);
/* Tables defined in the Data Encryption Standard documents */
@@ -211,8 +211,8 @@ ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/)
for (j = 0; j < 56; j++)
{ /* convert pc1 to bits of key */
l = pc1[j] - 1; /* integer bit location */
- m = l & 07; /* find bit */
- pc1m[j] = (user_key[l >> 3] & /* find which key byte l is in */
+ m = l & 07; /* tqfind bit */
+ pc1m[j] = (user_key[l >> 3] & /* tqfind which key byte l is in */
bytebit[m]) /* and which bit of that byte */
? 1 : 0; /* and store 1-bit result */
@@ -227,7 +227,7 @@ ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/)
/* check bit that goes to kn[j] */
if (pcr[pc2[j] - 1])
{
- /* mask it in if it's there */
+ /* tqmask it in if it's there */
l = j % 6;
dkey->kn[i][j / 6] |= bytebit[l] >> 2;
}
@@ -240,9 +240,9 @@ ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/)
static void
ntlm_des_encrypt (DES_KEY * key, unsigned char *block)
{
- Q_UINT32 left, right;
+ TQ_UINT32 left, right;
char *knp;
- Q_UINT32 work[2]; /* Working data storage */
+ TQ_UINT32 work[2]; /* Working data storage */
permute_ip (block, key, (unsigned char *) work); /* Initial Permutation */
left = KFromToBigEndian(work[0]);
@@ -310,7 +310,7 @@ permute_ip (unsigned char *inblock, DES_KEY * key, unsigned char *outblock)
ob = outblock;
p = key->iperm[j][(*ib >> 4) & 0xf];
q = key->iperm[j + 1][*ib & 0xf];
- /* and each output byte, OR the masks together */
+ /* and each output byte, OR the tqmasks together */
*ob++ |= *p++ | *q++;
*ob++ |= *p++ | *q++;
*ob++ |= *p++ | *q++;
@@ -339,7 +339,7 @@ permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *outblock)
ob = outblock;
p = key->fperm[j][(*ib >> 4) & 0xf];
q = key->fperm[j + 1][*ib & 0xf];
- /* and each output byte, OR the masks together */
+ /* and each output byte, OR the tqmasks together */
*ob++ |= *p++ | *q++;
*ob++ |= *p++ | *q++;
*ob++ |= *p++ | *q++;
@@ -352,11 +352,11 @@ permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *outblock)
}
/* The nonlinear function f(r,k), the heart of DES */
-static Q_UINT32
-f (DES_KEY * key, Q_UINT32 r, char *subkey)
+static TQ_UINT32
+f (DES_KEY * key, TQ_UINT32 r, char *subkey)
{
- Q_UINT32 *spp;
- Q_UINT32 rval, rt;
+ TQ_UINT32 *spp;
+ TQ_UINT32 rval, rt;
int er;
#ifdef TRACE
@@ -377,7 +377,7 @@ f (DES_KEY * key, Q_UINT32 r, char *subkey)
spp = &key->sp[7][0];
rval = spp[(er ^ *subkey--) & 0x3f];
spp -= 64;
- rt = (Q_UINT32) r >> 3;
+ rt = (TQ_UINT32) r >> 3;
rval |= spp[((int) rt ^ *subkey--) & 0x3f];
spp -= 64;
rt >>= 4;
@@ -457,7 +457,7 @@ spinit (DES_KEY * key)
{
char pbox[32];
int p, i, s, j, rowcol;
- Q_UINT32 val;
+ TQ_UINT32 val;
/* Compute pbox, the inverse of p32i.
* This is easier to work with