--- /dev/null
+// main.cpp
+//
+// Copyright 2010 Micke Nordin <mickewiki@gmail.com>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+// MA 02110-1301, USA.
+
+
+
+#include "mnenc.hpp"
+#include "password.hpp"
+
+int main(int argc, char** argv)
+{
+ mnenc menc = mnenc();
+ if(argc == 1) {
+ menc.genkey("MittMaster lösenord0092992££$$€");
+ std::cout << "Genererar key från hårdkodad lösenord\n";
+ } else {
+ menc.genkey(argv[1]);
+ std::cout << "Genererar key från medskickat lösenord\n";
+
+ }
+ std::string dec ="HarTestarJag LITE0123456789]][[[++++099";
+ std::string key = menc.get_key();
+ std::string enc = menc.encrypt(key, dec);
+ password pw = password(enc, dec, key);
+ pw.to_string();
+ pw.to_file("Passwdtest.txt");
+ pw.from_file("Passwdtest.txt"),
+ pw.to_string();
+ return 0;
+}