- ///////////////////////////////////////
- // Crypteur d'IP //
- // Fait par Ascguk le 22/12/2002 //
- ///////////////////////////////////////
-
- #include <stdio.h>
- #include <iostream.h>
-
-
- // fonction de cryptage
- unsigned long int Add (int x,int y,int z,int f)
- {
- return ((x*16777216)+(y*65536)+(z*256)+f);
- }
- int main() //Fonction Principale
- {
-
- cout <<" Crypteur d'IP\n\n";
- int a,b,c,d;
- unsigned long int e;
- cout <<"Entrez les 4 nombres de l'IP separes par des espaces : " ;
- cin >> a; // entrée des 4 variables
- cin >> b;
- cin >> c;
- cin >> d;
- e=Add(a,b,c,d); // Passage a Add
-
- cout<<"\nL'ip cryptee est egale a "<< e;//resultat
- cout<<"\n\nPour Finir appuyez sur Entree...\n" ;
- getchar(); //Attente pour finir
- return 0;
- }
///////////////////////////////////////
// Crypteur d'IP //
// Fait par Ascguk le 22/12/2002 //
///////////////////////////////////////
#include <stdio.h>
#include <iostream.h>
// fonction de cryptage
unsigned long int Add (int x,int y,int z,int f)
{
return ((x*16777216)+(y*65536)+(z*256)+f);
}
int main() //Fonction Principale
{
cout <<" Crypteur d'IP\n\n";
int a,b,c,d;
unsigned long int e;
cout <<"Entrez les 4 nombres de l'IP separes par des espaces : " ;
cin >> a; // entrée des 4 variables
cin >> b;
cin >> c;
cin >> d;
e=Add(a,b,c,d); // Passage a Add
cout<<"\nL'ip cryptee est egale a "<< e;//resultat
cout<<"\n\nPour Finir appuyez sur Entree...\n" ;
getchar(); //Attente pour finir
return 0;
}