

#include <iostream>
#include <string>
#include <conio.h>
#include <ctime>
using namespace std;
int wybor;
int main()
{
srand( time( NULL ) );
system("color 2");
system("cls");
cout << "###########################################" << endl;
cout << "# Prosty tworzyciel hasel by vMaximus (c) 2006 #" << endl;
cout << "###########################################" << endl << endl;
cout << "1) szyfruj haslo 2) odczytaj zaszyfrowane haslo 3) o programie" << endl;
cin >> wybor;
if (wybor == 1)
{
int haslo, tryb, GMX;
cout << "wpisz haslo: " << endl;
cin >> haslo;
GMX=( rand() % 999 ) + 1;
tryb=( rand() % 2 ) + 1;
if (tryb == 1) haslo=haslo+GMX*117+11510;
if (tryb == 2) haslo=haslo-GMX*21-2034;
cout << "haslo wyjsciowe: " << haslo << endl;
cout << "tryb szyfrowania: " << tryb << endl;
cout << "parametr: " << GMX << endl;
getch();
}
if (wybor == 2)
{
int haslo,tryb, GMX;
cout << "podaj haslo wyjsciowe: " << endl;
cin >> haslo;
cout << "podaj tryb szyfrowania: " << endl;
cin >> tryb;
cout << "podaj parametr szyfrowania: " << endl;
cin >> GMX;
if (tryb == 1) haslo=haslo-GMX*117-11510;
if (tryb == 2) haslo=haslo+GMX*21+2034;
cout << "haslo: " << haslo << endl;
getch();
}
if (wybor == 3)
{
cout << "vMaximus Pass Coder 1.0 (c) 2006" << endl;
getch();
}
main();
return EXIT_SUCCESS;
}