mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 07:51:00 +00:00
fix-indent-bug-with-lock-macros-part-four-20040819
Thanks to jaltman for pointing out some files I missed (basically those in two-level deep directories).
This commit is contained in:
parent
c18d67d9a0
commit
b0f773c41c
@ -61,9 +61,10 @@ rxkad_DecryptPacket(const struct rx_connection *conn,
|
||||
|
||||
obj = rx_SecurityObjectOf(conn);
|
||||
tp = (struct rxkad_cprivate *)obj->privateData;
|
||||
LOCK_RXKAD_STATS rxkad_stats.bytesDecrypted[rxkad_TypeIndex(tp->type)] +=
|
||||
len;
|
||||
UNLOCK_RXKAD_STATS memcpy((void *)xor, (void *)ivec, sizeof(xor));
|
||||
LOCK_RXKAD_STATS;
|
||||
rxkad_stats.bytesDecrypted[rxkad_TypeIndex(tp->type)] += len;
|
||||
UNLOCK_RXKAD_STATS;
|
||||
memcpy((void *)xor, (void *)ivec, sizeof(xor));
|
||||
for (i = 0; len; i++) {
|
||||
data = rx_data(packet, i, tlen);
|
||||
if (!data || !tlen)
|
||||
@ -96,15 +97,15 @@ rxkad_EncryptPacket(const struct rx_connection * conn,
|
||||
|
||||
obj = rx_SecurityObjectOf(conn);
|
||||
tp = (struct rxkad_cprivate *)obj->privateData;
|
||||
LOCK_RXKAD_STATS rxkad_stats.bytesEncrypted[rxkad_TypeIndex(tp->type)] +=
|
||||
len;
|
||||
UNLOCK_RXKAD_STATS
|
||||
/*
|
||||
* afs_int32 cksum;
|
||||
* cksum = htonl(0);
|
||||
* * Future option to add cksum here, but for now we just put 0
|
||||
*/
|
||||
rx_PutInt32(packet, 1 * sizeof(afs_int32), 0);
|
||||
LOCK_RXKAD_STATS;
|
||||
rxkad_stats.bytesEncrypted[rxkad_TypeIndex(tp->type)] += len;
|
||||
UNLOCK_RXKAD_STATS;
|
||||
/*
|
||||
* afs_int32 cksum;
|
||||
* cksum = htonl(0);
|
||||
* * Future option to add cksum here, but for now we just put 0
|
||||
*/
|
||||
rx_PutInt32(packet, 1 * sizeof(afs_int32), 0);
|
||||
|
||||
memcpy((void *)xor, (void *)ivec, sizeof(xor));
|
||||
for (i = 0; len; i++) {
|
||||
|
@ -102,8 +102,10 @@ fc_keysched(struct ktc_encryptionKey *key, fc_KeySchedule schedule)
|
||||
kword[1] = (kword[1] >> 11) | (temp << (56 - 32 - 11));
|
||||
schedule[i] = kword[0];
|
||||
}
|
||||
LOCK_RXKAD_STATS rxkad_stats.fc_key_scheds++;
|
||||
UNLOCK_RXKAD_STATS return 0;
|
||||
LOCK_RXKAD_STATS;
|
||||
rxkad_stats.fc_key_scheds++;
|
||||
UNLOCK_RXKAD_STATS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* IN int encrypt; * 0 ==> decrypt, else encrypt */
|
||||
@ -138,8 +140,10 @@ fc_ecb_encrypt(afs_uint32 * clear, afs_uint32 * cipher,
|
||||
#endif
|
||||
|
||||
if (encrypt) {
|
||||
LOCK_RXKAD_STATS rxkad_stats.fc_encrypts[ENCRYPT]++;
|
||||
UNLOCK_RXKAD_STATS for (i = 0; i < (ROUNDS / 2); i++) {
|
||||
LOCK_RXKAD_STATS;
|
||||
rxkad_stats.fc_encrypts[ENCRYPT]++;
|
||||
UNLOCK_RXKAD_STATS;
|
||||
for (i = 0; i < (ROUNDS / 2); i++) {
|
||||
S = *schedule++ ^ R; /* xor R with key bits from schedule */
|
||||
Pchar[Byte2] = sbox0[Schar[Byte0]]; /* do 8-bit S Box subst. */
|
||||
Pchar[Byte3] = sbox1[Schar[Byte1]]; /* and permute the result */
|
||||
@ -156,8 +160,10 @@ fc_ecb_encrypt(afs_uint32 * clear, afs_uint32 * cipher,
|
||||
R ^= P;
|
||||
}
|
||||
} else {
|
||||
LOCK_RXKAD_STATS rxkad_stats.fc_encrypts[DECRYPT]++;
|
||||
UNLOCK_RXKAD_STATS schedule = &schedule[ROUNDS - 1]; /* start at end of key schedule */
|
||||
LOCK_RXKAD_STATS;
|
||||
rxkad_stats.fc_encrypts[DECRYPT]++;
|
||||
UNLOCK_RXKAD_STATS;
|
||||
schedule = &schedule[ROUNDS - 1]; /* start at end of key schedule */
|
||||
for (i = 0; i < (ROUNDS / 2); i++) {
|
||||
S = *schedule-- ^ L; /* xor R with key bits from schedule */
|
||||
Pchar[Byte2] = sbox0[Schar[Byte0]]; /* do 8-bit S Box subst. and */
|
||||
|
Loading…
Reference in New Issue
Block a user