Generation

generate functionTue, 17 Jan 2023

Зашифровать файл 1.txt алгоритмом tea

void Encrypt(DWORD *const v, DWORD *const k) { DWORD y = v[0], z = v[1], sum = 0, /* set up */ delta = 0x9E3779B9, /* a key schedule constant */ n = 32; while (n-- > 0) { /* basic cycle start */ sum += delta; y += (z << 4) + k[0] ^ z + sum ^ (z >> 5) + k[1]; z += (y << 4) + k[2] ^ y + sum ^ (y >> 5) + k[3]; } /* end cycle */ v[0] = y; v[1] = z; }

Questions about programming?Chat with your personal AI assistant