so i have this code i have used before in C++ but i can not figure out how to get it to work on the arduino. im trying to "see how secure my passwords are" and im using the arduino as a dedicated processor to see how fast it can crack my password:
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
char chars[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
string t="mysuperpassword417938";
int s=0;
void checkPassword(string password);
void recurse(int width, int position, string baseString);
int main() {
// cout << "Enter a string: " << endl;
//cin >> t;
int maxChars = 13;
for(int i=0;i<maxChars+1;i++) {
cout << "checking passwords width [" << i << "]..." << endl;
recurse(i,0,"");
}
return 0;
}
void recurse(int width, int position, string baseString) {
for(int i=0;i<10;i++) {
if (position < width-1) {
recurse(width, position + 1, baseString+chars[i]);
}
checkPassword(baseString+chars[i]);
}
}
void checkPassword(string password) {
if (password==t) {
cout << "match [" << password << "]" << endl;
// exit(1);
}
}
any sugestions? :~ :~ :~
Moderator edit:
</mark> <mark>[code]</mark> <mark>
</mark> <mark>[/code]</mark> <mark>
tags added.