+++ /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;
-}
+++ /dev/null
-#############################################################################
-# Makefile for building: unlock
-# Generated by qmake (2.01a) (Qt 4.6.0) on: sön jan 10 20:23:31 2010
-# Project: unlock.pro
-# Template: app
-# Command: /usr/bin/qmake -unix -o Makefile unlock.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC = gcc
-CXX = g++
-DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
-INCPATH = -I/usr/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I.
-LINK = g++
-LFLAGS = -Wl,-O1 -Wl,-rpath,/usr/lib
-LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
-AR = ar cqs
-RANLIB =
-QMAKE = /usr/bin/qmake
-TAR = tar -cf
-COMPRESS = gzip -9f
-COPY = cp -f
-SED = sed
-COPY_FILE = $(COPY)
-COPY_DIR = $(COPY) -r
-STRIP = strip
-INSTALL_FILE = install -m 644 -p
-INSTALL_DIR = $(COPY_DIR)
-INSTALL_PROGRAM = install -m 755 -p
-DEL_FILE = rm -f
-SYMLINK = ln -sf
-DEL_DIR = rmdir
-MOVE = mv -f
-CHK_DIR_EXISTS= test -d
-MKDIR = mkdir -p
-
-####### Output directory
-
-OBJECTS_DIR = ./
-
-####### Files
-
-SOURCES = main.cpp \
- unlock.cpp moc_unlock.cpp
-OBJECTS = main.o \
- unlock.o \
- moc_unlock.o
-DIST = /usr/mkspecs/common/g++.conf \
- /usr/mkspecs/common/unix.conf \
- /usr/mkspecs/common/linux.conf \
- /usr/mkspecs/qconfig.pri \
- /usr/mkspecs/features/qt_functions.prf \
- /usr/mkspecs/features/qt_config.prf \
- /usr/mkspecs/features/exclusive_builds.prf \
- /usr/mkspecs/features/default_pre.prf \
- /usr/mkspecs/features/release.prf \
- /usr/mkspecs/features/default_post.prf \
- /usr/mkspecs/features/warn_on.prf \
- /usr/mkspecs/features/qt.prf \
- /usr/mkspecs/features/unix/thread.prf \
- /usr/mkspecs/features/moc.prf \
- /usr/mkspecs/features/resources.prf \
- /usr/mkspecs/features/uic.prf \
- /usr/mkspecs/features/yacc.prf \
- /usr/mkspecs/features/lex.prf \
- /usr/mkspecs/features/include_source_dir.prf \
- unlock.pro
-QMAKE_TARGET = unlock
-DESTDIR =
-TARGET = unlock
-
-first: all
-####### Implicit rules
-
-.SUFFIXES: .o .c .cpp .cc .cxx .C
-
-.cpp.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cc.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cxx.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.C.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
-
-####### Build rules
-
-all: Makefile $(TARGET)
-
-$(TARGET): ui_unlock.h $(OBJECTS)
- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: unlock.pro /usr/mkspecs/linux-g++/qmake.conf /usr/mkspecs/common/g++.conf \
- /usr/mkspecs/common/unix.conf \
- /usr/mkspecs/common/linux.conf \
- /usr/mkspecs/qconfig.pri \
- /usr/mkspecs/features/qt_functions.prf \
- /usr/mkspecs/features/qt_config.prf \
- /usr/mkspecs/features/exclusive_builds.prf \
- /usr/mkspecs/features/default_pre.prf \
- /usr/mkspecs/features/release.prf \
- /usr/mkspecs/features/default_post.prf \
- /usr/mkspecs/features/warn_on.prf \
- /usr/mkspecs/features/qt.prf \
- /usr/mkspecs/features/unix/thread.prf \
- /usr/mkspecs/features/moc.prf \
- /usr/mkspecs/features/resources.prf \
- /usr/mkspecs/features/uic.prf \
- /usr/mkspecs/features/yacc.prf \
- /usr/mkspecs/features/lex.prf \
- /usr/mkspecs/features/include_source_dir.prf \
- /usr/lib/libQtGui.prl \
- /usr/lib/libQtCore.prl
- $(QMAKE) -unix -o Makefile unlock.pro
-/usr/mkspecs/common/g++.conf:
-/usr/mkspecs/common/unix.conf:
-/usr/mkspecs/common/linux.conf:
-/usr/mkspecs/qconfig.pri:
-/usr/mkspecs/features/qt_functions.prf:
-/usr/mkspecs/features/qt_config.prf:
-/usr/mkspecs/features/exclusive_builds.prf:
-/usr/mkspecs/features/default_pre.prf:
-/usr/mkspecs/features/release.prf:
-/usr/mkspecs/features/default_post.prf:
-/usr/mkspecs/features/warn_on.prf:
-/usr/mkspecs/features/qt.prf:
-/usr/mkspecs/features/unix/thread.prf:
-/usr/mkspecs/features/moc.prf:
-/usr/mkspecs/features/resources.prf:
-/usr/mkspecs/features/uic.prf:
-/usr/mkspecs/features/yacc.prf:
-/usr/mkspecs/features/lex.prf:
-/usr/mkspecs/features/include_source_dir.prf:
-/usr/lib/libQtGui.prl:
-/usr/lib/libQtCore.prl:
-qmake: FORCE
- @$(QMAKE) -unix -o Makefile unlock.pro
-
-dist:
- @$(CHK_DIR_EXISTS) .tmp/unlock1.0.0 || $(MKDIR) .tmp/unlock1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/unlock1.0.0/ && $(COPY_FILE) --parents unlock.hpp .tmp/unlock1.0.0/ && $(COPY_FILE) --parents main.cpp unlock.cpp .tmp/unlock1.0.0/ && $(COPY_FILE) --parents unlock.ui .tmp/unlock1.0.0/ && (cd `dirname .tmp/unlock1.0.0` && $(TAR) unlock1.0.0.tar unlock1.0.0 && $(COMPRESS) unlock1.0.0.tar) && $(MOVE) `dirname .tmp/unlock1.0.0`/unlock1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/unlock1.0.0
-
-
-clean:compiler_clean
- -$(DEL_FILE) $(OBJECTS)
- -$(DEL_FILE) *~ core *.core
-
-
-####### Sub-libraries
-
-distclean: clean
- -$(DEL_FILE) $(TARGET)
- -$(DEL_FILE) Makefile
-
-
-mocclean: compiler_moc_header_clean compiler_moc_source_clean
-
-mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-
-compiler_moc_header_make_all: moc_unlock.cpp
-compiler_moc_header_clean:
- -$(DEL_FILE) moc_unlock.cpp
-moc_unlock.cpp: unlock.hpp
- /usr/bin/moc $(DEFINES) $(INCPATH) unlock.hpp -o moc_unlock.cpp
-
-compiler_rcc_make_all:
-compiler_rcc_clean:
-compiler_image_collection_make_all: qmake_image_collection.cpp
-compiler_image_collection_clean:
- -$(DEL_FILE) qmake_image_collection.cpp
-compiler_moc_source_make_all:
-compiler_moc_source_clean:
-compiler_uic_make_all: ui_unlock.h
-compiler_uic_clean:
- -$(DEL_FILE) ui_unlock.h
-ui_unlock.h: unlock.ui
- /usr/bin/uic unlock.ui -o ui_unlock.h
-
-compiler_yacc_decl_make_all:
-compiler_yacc_decl_clean:
-compiler_yacc_impl_make_all:
-compiler_yacc_impl_clean:
-compiler_lex_make_all:
-compiler_lex_clean:
-compiler_clean: compiler_moc_header_clean compiler_uic_clean
-
-####### Compile
-
-main.o: main.cpp unlock.hpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
-
-unlock.o: unlock.cpp unlock.hpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o unlock.o unlock.cpp
-
-moc_unlock.o: moc_unlock.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_unlock.o moc_unlock.cpp
-
-####### Install
-
-install: FORCE
-
-uninstall: FORCE
-
-FORCE:
-
+++ /dev/null
-/****************************************************************************
-** Meta object code from reading C++ file 'unlock.hpp'
-**
-** Created: Sun Jan 10 20:26:46 2010
-** by: The Qt Meta Object Compiler version 62 (Qt 4.6.0)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "unlock.hpp"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'unlock.hpp' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 62
-#error "This file was generated using the moc from 4.6.0. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_unlock[] = {
-
- // content:
- 4, // revision
- 0, // classname
- 0, 0, // classinfo
- 1, 14, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
- 0, // flags
- 0, // signalCount
-
- // slots: signature, parameters, type, tag, flags
- 8, 7, 7, 7, 0x08,
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_unlock[] = {
- "unlock\0\0Close()\0"
-};
-
-const QMetaObject unlock::staticMetaObject = {
- { &QMainWindow::staticMetaObject, qt_meta_stringdata_unlock,
- qt_meta_data_unlock, 0 }
-};
-
-#ifdef Q_NO_DATA_RELOCATION
-const QMetaObject &unlock::getStaticMetaObject() { return staticMetaObject; }
-#endif //Q_NO_DATA_RELOCATION
-
-const QMetaObject *unlock::metaObject() const
-{
- return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
-}
-
-void *unlock::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_unlock))
- return static_cast<void*>(const_cast< unlock*>(this));
- return QMainWindow::qt_metacast(_clname);
-}
-
-int unlock::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QMainWindow::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- if (_c == QMetaObject::InvokeMetaMethod) {
- switch (_id) {
- case 0: Close(); break;
- default: ;
- }
- _id -= 1;
- }
- return _id;
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-/********************************************************************************
-** Form generated from reading UI file 'unlock.ui'
-**
-** Created: Sun Jan 10 20:23:33 2010
-** by: Qt User Interface Compiler version 4.6.0
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_UNLOCK_H
-#define UI_UNLOCK_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QMainWindow>
-#include <QtGui/QPushButton>
-#include <QtGui/QWidget>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_MainWindow
-{
-public:
- QWidget *centralwidget;
- QLineEdit *lineEdit;
- QPushButton *pushButton;
- QLabel *label;
-
- void setupUi(QMainWindow *MainWindow)
- {
- if (MainWindow->objectName().isEmpty())
- MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
- MainWindow->resize(182, 66);
- centralwidget = new QWidget(MainWindow);
- centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
- lineEdit = new QLineEdit(centralwidget);
- lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
- lineEdit->setGeometry(QRect(0, 30, 113, 26));
- pushButton = new QPushButton(centralwidget);
- pushButton->setObjectName(QString::fromUtf8("pushButton"));
- pushButton->setGeometry(QRect(120, 30, 51, 28));
- label = new QLabel(centralwidget);
- label->setObjectName(QString::fromUtf8("label"));
- label->setGeometry(QRect(0, 10, 171, 18));
- MainWindow->setCentralWidget(centralwidget);
-
- retranslateUi(MainWindow);
-
- QMetaObject::connectSlotsByName(MainWindow);
- } // setupUi
-
- void retranslateUi(QMainWindow *MainWindow)
- {
- MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
- pushButton->setText(QApplication::translate("MainWindow", "Ok", 0, QApplication::UnicodeUTF8));
- label->setText(QApplication::translate("MainWindow", "Enter master password", 0, QApplication::UnicodeUTF8));
- } // retranslateUi
-
-};
-
-namespace Ui {
- class MainWindow: public Ui_MainWindow {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_UNLOCK_H
<rect>
<x>0</x>
<y>0</y>
- <width>182</width>
- <height>66</height>
+ <width>450</width>
+ <height>322</height>
</rect>
</property>
<property name="windowTitle">
<widget class="QLineEdit" name="lineEdit">
<property name="geometry">
<rect>
- <x>0</x>
+ <x>170</x>
<y>30</y>
<width>113</width>
<height>26</height>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
- <x>120</x>
- <y>30</y>
+ <x>200</x>
+ <y>60</y>
<width>51</width>
<height>28</height>
</rect>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
- <x>0</x>
+ <x>150</x>
<y>10</y>
- <width>171</width>
+ <width>151</width>
<height>18</height>
</rect>
</property>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
- <x>145</x>
- <y>43</y>
+ <x>55</x>
+ <y>73</y>
</hint>
<hint type="destinationlabel">
<x>90</x>