align="justify"> unsigned * temp2 = new unsigned [17];
if ((i> j) | | ((i == j) && (ostT [i]> b [j])))
{
do
{
for (int g = 0; g <17; g+ +) temp1 [g] = 0;
if (ostT [i]> b [j]) del = (ost [i]/b [j]);
else
{
i -;
point.a [0] = ostT [i];
point.a [1] = ostT [i +1];
del = point.b/b [j] - 1;
del = (del == 0)? 1: del;
}
RaznPoz = i - j;
temp1 [RaznPoz] = del;
rez [RaznPoz] = (rez [RaznPoz] == 0)? del: (rez [RaznPoz] + del);
Mult16 (b, temp1, temp2);
Razn16 (ostT, temp2, temp1);
for (int u = 15; u> = 0; u -) ostT [u] = temp1 [u];
i = 8;
do
{
i -;
if (i == -1) {i = 0; break;}
} while (ostT [i] == 0);
} while (i> j);
int pointer = 0;
for (g = 0; g <8; g+ +) temp2 [g] = b [g];
for (g = 8; g <16; g+ +) temp2 [g] = 0;
while (ostT [i]> = b [j])
{
Razn16 (ostT, temp2, temp1);
for (g = 7; g> = 0; g -) ostT [g] = temp1 [g];
pointer + +;
} ;
rez [0] + = pointer;
} ;
delete temp1;
delete temp2;
}
3. idea.cpp
// ================== idea.cpp =================== =========
// ------- International Data Encription Algorithm -------- unsigned long type32; unsigned type16; unsigned char type8;
// ---------------------------------------- -------------- EncriptionStep (unsigned *, unsigned *); IDEA (unsigned *, unsigned *); SdvigMas1_4 (unsigned *); GenerateKey (type16 *, type16 *); sdvig25 (type16 *); IDEA_OFB (unsigned *, unsigned *, unsigned *, int); mul (unsigned, unsigned);
// ---------------------------------------- -------------- EncriptionStep (unsigned * key, unsigned * mes)
{
unsigned long a, b, c, d, e, f, g, h;
a = mul (mes [0], key [0]);// 1
b = ((unsigned long) mes [1] + key [1])% 65536;/...