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 45 46 47 48 49
|
// 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' },{ 'c','c' },{ 'd','d' },{ 'e','3' },{ 'f','f' },{ 'g','g' },{ 'h','4' },{ 'i','1' },{ 'j','j' },{ 'k','k' },{'l','l'}, { 'm','m' },{ 'n','n' },{ 'o','0' },{ 'p','p' },{ 'q','q' },{ 'r','r' },{ 's','$' },{ 't','t' },{ 'u','u' },{'v', 'v' }, { 'w','w' }, { 'x','x' }, { 'y','y' }, { 'z','z' },{ 'A','@' },{ 'B','8' },{ 'C','C' },{ 'D','D' },{ 'E','3' },{ 'F','F' },{ 'G','G' },{ 'H','4' },{ 'I','1' },{ 'J','J' },{ 'K','K' },{ 'L','L' },{ 'M','M' },{ 'N','N' },{ 'O','0' },{ 'P','P' },{ 'Q','Q' },{ 'R','R' },{ 'S','$' },{ 'T','T' },{ 'U','U' },{ 'V', 'V' },{ 'W','W' },{ 'X','X' },{ 'Y','Y' },{ 'Z','Z' }
};
using namespace std;
int main()
{
system("color 02");
ofstream out_data("password.txt");
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 << "Your secure password:" << "\n" << r << cipher << r << "\n";
cout << "Numbers generated on try " << p << "\n";
cout << "Type exit to quit \n" ;
cin >> q;
return 0;
;
}
|