update// added some stuff

This commit is contained in:
Strider
2020-05-23 15:23:07 +02:00
parent 1599f3631c
commit a72ba09ee3
8 changed files with 106 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
#include <QString>
#include <QList>
#include "../Crypto/passwd.h"
FileSystem::FileSystem()
{
@@ -85,6 +86,13 @@ void FileSystem::writeContactsOldFormat(QString file, QList<ContactItem> contact
QList<ContactItem> FileSystem::readContactsOldFormat(QString file)
{
const unsigned char* data=PASSWD::hash(QString("Hello world"));
PASSWD::show_hex_buff((unsigned char*) data);
QString source_file = "/tmp/addresslabels.dat";
QString target_file = "/tmp/addresslabels.dat.enc";
FileEncryption::encrypt(target_file, source_file, data);
FileEncryption::decrypt("/tmp/addresslabels.dat.dec", target_file, data);
QList<ContactItem> contacts;
QFile _file(file);
if (_file.exists())