1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
std::string hash(string nom, string taille)
{
// déclaration des variables
union u_init init;
// mise en place du mots
z = 0;
mot = nom+taille;
i = 8*9;.....................................................
h[0] = h[0]+a;
h[1] = h[1]+b;
h[2] = h[2]+c;
h[3] = h[3]+d;
h[4] = h[4]+e;
retour = ??????????????;
}
t = t+1;
}
return retour;
}
int main(void)
{
string nom;
string taille;
std::cout << "nom du fichier: " << endl;
std::cin >> nom;
std::cout << "taille du fichier: " << endl;
std::cin >> taille;
std::cout << "\nHASH du fichier: " << endl;
hash(nom, taille);
std::cout << retour << endl;
system("PAUSE");
return EXIT_SUCCESS;
} |
Partager