You can find the SHA512 C++ files here.
/reads a text file and ouputs plaintext hash pairs to a new file
#include <string>
#include <sstream>
#include <iostream>
#include <cctype>
#include <fstream>
#include "sha512.h"
using namespace std;
int main (int argc, char* argv[])
{
cout << "creating" << argv[2] << endl;
{ofstream myfile;
myfile.open (argv[2]);
{ string line; ifstream infile (argv[1]);
if (infile.is_open())
{
{ while ( getline (infile,line) )
{
myfile << sha512(line) << endl;
myfile << line << endl;
}
infile.close();
}
}
else cout << "Unable to open file" << endl;
cout << argv[2] << " complete" << endl;
}
}
return 0; }
No comments:
Post a Comment