Commit 1cc5bde1 authored by Karel Slaný's avatar Karel Slaný

Moved crypto wrapper functions into shared.

parent c3d5e739
......@@ -29,15 +29,14 @@ winphone|winrt|win32 {
-Wall -Wextra -pedantic
SOURCES += \
src/crypto/crypto.c \
src/crypto/wrapped.cpp \
src/datovka_shared/crypto/crypto_pin.c \
src/datovka_shared/crypto/crypto_pwd.c
src/datovka_shared/crypto/crypto_pwd.c \
src/datovka_shared/crypto/crypto_wrapped.cpp
HEADERS += \
src/crypto/crypto.h \
src/crypto/pin.h \
src/crypto/wrapped.h \
src/datovka_shared/crypto/crypto_pin.h \
src/datovka_shared/crypto/crypto_pwd.h
src/datovka_shared/crypto/crypto_pwd.h \
src/datovka_shared/crypto/crypto_wrapped.h
LIBS += \
-lcrypto
}
......
/*
* Copyright (C) 2014-2016 CZ.NIC
* Copyright (C) 2014-2017 CZ.NIC
*
* 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
......@@ -21,9 +21,9 @@
* the two.
*/
#include "src/crypto/wrapped.h"
#include "src/datovka_shared/crypto/crypto_pin.h"
#include "src/datovka_shared/crypto/crypto_pwd.h"
#include "src/datovka_shared/crypto/crypto_wrapped.h"
QByteArray randomSalt(unsigned int len)
{
......
/*
* Copyright (C) 2014-2016 CZ.NIC
* Copyright (C) 2014-2017 CZ.NIC
*
* 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
......@@ -21,8 +21,7 @@
* the two.
*/
#ifndef _WRAPPED_H_
#define _WRAPPED_H_
#pragma once
#include <QByteArray>
#include <QString>
......@@ -72,5 +71,3 @@ QByteArray encryptPwd(const QString &plainPwd, const QString &pinVal,
*/
QString decryptPwd(const QByteArray &encrPwd, const QString &pinVal,
const QString &pwdAlg, const QByteArray &pwdSalt, const QByteArray &pwdIV);
#endif /* _WRAPPED_H_ */
......@@ -24,8 +24,8 @@
#include <QDebug>
#include <QQmlEngine> /* qmlRegisterType */
#include "src/crypto/wrapped.h"
#include "src/datovka_shared/crypto/crypto_pwd.h"
#include "src/datovka_shared/crypto/crypto_wrapped.h"
#include "src/models/accountmodel.h"
#include "src/settings.h" // globSet
......
......@@ -23,8 +23,8 @@
#include <QFileDialog>
#include "src/crypto/wrapped.h"
#include "src/datovka_shared/crypto/crypto_pin.h"
#include "src/datovka_shared/crypto/crypto_wrapped.h"
#include "src/dialogues/dialogues.h"
#include "src/models/accountmodel.h"
#include "src/io/filesystem.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment