#include "stdafx.h" #define bit(x, n) (((x) >> (n)) & 0x01) int main(int argc, char* argv[]) { printf("Hello World!/n"); unsigned char data[256]; unsigned char cp[6]; unsigned char rp[16]; unsigned char cpa; int i; int j; unsigned char cp1[6]; unsigned char rp1[16]; unsigned char cpa1; printf("one time: /r/n"); for (i = 0; i < 256; i++) { data[i] = i + 1; if (i < 6) { cp[i] = 0; } if (i < 16) { rp[i] = 0; } } for (i = 0; i < 256; i++) { cp[0] = cp[0] ^ bit(data[i], 0) ^ bit(data[i], 2) ^ bit(data[i], 4) ^ bit(data[i], 6); cp[1] = cp[1] ^ bit(data[i], 1) ^ bit(data[i], 3) ^ bit(data[i], 5) ^ bit(data[i], 7); cp[2] = cp[2] ^ bit(data[i], 0) ^ bit(data[i], 1) ^ bit(data[i], 4) ^ bit(data[i], 5); cp[3] = cp[3] ^ bit(data[i], 2) ^ bit(data[i], 3) ^ bit(data[i]