Example #1
0
 void Round (u32 const * const k,u32 * const a,u8 const RC1,u8 const RC2)
{ 
  a[0] ^= RC1;
  Theta(k,a); 
  a[0] ^= RC2;
  Pi1(a); 
  Gamma(a); 
  Pi2(a); 
}  /* Round */
/*==================================================================================*/
void Round (u32 const * const k,u32 * const a,u8 const RC1,u8 const RC2)
/*----------------------------------------------------------------------------------*/
/* The round function, common to both encryption and decryption
/* - Round constants is added to the rightmost byte of the leftmost 32-bit word (=a0)
/*==================================================================================*/
{ 
  a[0] ^= RC1;
  Theta(k,a); 
  a[0] ^= RC2;
  Pi1(a); 
  Gamma(a); 
  Pi2(a); 
}  /* Round */
Example #3
0
void main()
{
	  int ci=0;
	  Linea L1(ci,380,ci,430);
	  Linea L2(ci+20,380,ci+20,430);
	  // Circulo Cir1(20,20,20);
	  Circulo Cir2(60,60,60);
	  Elipse E1(0,0,40,60);
	  Rectangulo Rec1(25,60,0,0);
	  pico Pi1 (80,165,150,180,50);
	  pico Pi2(40,440,130,180,50);
	  pico Pi3 (20,440,130,180,50);

	  int a,b,i;
	  a=DETECT;
	  initgraph(&a,&b," ");
	  for(i=0;i<640;i++)
	  {
	Pi1.Dibuja();
	Pi2.Dibuja();
	Pi3.Dibuja();
	//Cir1.Mover(i+10,120);
	E1.Mover(10+i,330);
	Cir2.Mover(i,150);
	Rec1.Mover(i-5,210);
	L1.Mover(1);
		  L2.Mover(1);

	if(i==0)
		getch();

	//delay(1);
	  }
	  getch();
	  closegraph();
}