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 37 38 39 40 41 42 43 44
|
// Password complexicator
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <map>
#include <string>
std::map<char, char> myMap{ { 'a', '@' },{ 'b', '8' },{ 's', '$' },{ 'e', '3' },{ 'o', '0' },{ 'i','1' },{ 'h','4'},{ 'A', '@' },{ 'B', '8' },{ 'S', '$' },{ 'E', '3' },{ 'O', '0' },{ 'I','1' },{ 'H','4' } };
using namespace std;
int main()
{
ofstream out_data("filename.dat");
srand(time(0));
char a, b, e, h, i, o, s;
char q[16];
int r, p;
r = rand();
for (p = 01; r <= 29427; p++)
r = rand();
cout << "Enter word:" << "\n";
string line;
getline(cin, line);
string cipher{};
for (auto& elem : line)
{
cipher += myMap.find(elem)->second;
}
cout << "Your password is: " << "\n" << r << cipher << r << "\n";
; ;out_data << "Password" << "\n" << r << cipher << r << "\n";
cout << "Numbers generated on try " << p << "\n";
return 0;
;
}
|