for (i = 0; i < 256; ++i) {
k = crc32_reverseBit((u8)i);
- for (c = ((u32)k) << 24, j = 8; j > 0; --j) {
+ for (c = ((u32)k) << 24, j = 8; j > 0; --j)
c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY_BE : (c << 1);
- }
p1 = (u8 *)&crc32_table[i];
p1[0] = crc32_reverseBit(p[3]);
crc = 0xffffffff; /* preload shift register, per CRC-32 spec */
- for (p = buf; len > 0; ++p, --len) {
+ for (p = buf; len > 0; ++p, --len)
crc = crc32_table[(crc ^ *p) & 0xff] ^ (crc >> 8);
- }
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
}
s32 i;
u32 res = 0;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 4; i++)
res |= ((u32)(*p++)) << (8*i);
- }
return res;
}
rtw_secmicappendbyte(pmicdata, 0);
rtw_secmicappendbyte(pmicdata, 0);
/* and then zeroes until the length is a multiple of 4 */
- while (pmicdata->nBytesInM != 0) {
+ while (pmicdata->nBytesInM != 0)
rtw_secmicappendbyte(pmicdata, 0);
- }
/* The appendByte function has already computed the result. */
secmicputuint32(dst, pmicdata->L);
secmicputuint32(dst+4, pmicdata->R);
{
sint i;
- for (i = 0; i < 16; i++) {
+ for (i = 0; i < 16; i++)
out[i] = a[i] ^ b[i];
- }
}
{
sint i;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 4; i++)
out[i] = a[i] ^ b[i];
- }
}
{
sint i;
- for (i = 0; i < 16; i++) {
+ for (i = 0; i < 16; i++)
out[i] = sbox(in[i]);
- }
}
{
sint i;
- for (i = 0; i < 16; i++) {
+ for (i = 0; i < 16; i++)
out[i] = ina[i] ^ inb[i];
- }
}
static sint aes_cipher(u8 *key, uint hdrlen,