fy"> {
FILE * file_T;
unsigned T [N] [N] = {0,};
file_T = fopen ("matrix.lin", "wb");
for (int i = 0; i <8; i + +)
{
GenerateT (T);
fwrite (& T, sizeof (unsigned), N * N, file_T);
}
fclose (file_T);
}
Результатом виконання програми є файл matrix.lin.
Генератор парного ключа.
# include lin . cpp
# include ext128.cpp
# include
# include
# include
# include
// ---------------------------------------- --------------- main (int argc, char ** argv)
{
if (argc <4)
{
cout <
<< crk.exe U1_number U2_number U1.x U2.y file.t
<
return 1;
}
// ==================== initialization data =================
FILE * osnkey;
FILE * rezkey;
FILE * stat;
FILE * X_file;
FILE * Y_file;
FILE * T_file;
unsigned Num1 = atoi (argv [1]), В©;
unsigned Num2 = atoi (argv [2]);
char dest1 [9];
char dest2 [9];
char dest3 [9];
char * n1 = u , * ext1 = . lin , * ext2 = . d_h ; p>
strcpy (dest1, n1);
strcat (dest1, argv [1]);
strcat (dest1, ext1);
if ((osnkey = fopen (dest1, wb )) == NULL) p>
{
cout << KeyFile not open. ;
return 1;
}
strcpy (dest2, n1);
strcat (dest2, argv [1]);
strcat (dest2, ext2);
if ((rezkey = fopen (dest2, wb )) == NULL) p>