Updated LockedFile class for latest MUtilities changes.
This commit is contained in:
parent
f1f5a1eacb
commit
c20929cb20
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 1
|
#define VER_LAMEXP_MINOR_LO 1
|
||||||
#define VER_LAMEXP_TYPE Beta
|
#define VER_LAMEXP_TYPE Beta
|
||||||
#define VER_LAMEXP_PATCH 14
|
#define VER_LAMEXP_PATCH 14
|
||||||
#define VER_LAMEXP_BUILD 1676
|
#define VER_LAMEXP_BUILD 1677
|
||||||
#define VER_LAMEXP_CONFG 1558
|
#define VER_LAMEXP_CONFG 1558
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
|
|
||||||
//MUtils
|
//MUtils
|
||||||
#include <MUtils/KeccakHash.h>
|
|
||||||
#include <MUtils/OSSupport.h>
|
#include <MUtils/OSSupport.h>
|
||||||
|
#include <MUtils/Hash_Keccak.h>
|
||||||
#include <MUtils/Exception.h>
|
#include <MUtils/Exception.h>
|
||||||
|
|
||||||
//Qt
|
//Qt
|
||||||
@ -75,13 +75,13 @@ QByteArray LockedFile::fileHash(QFile &file)
|
|||||||
|
|
||||||
if(file.isOpen() && file.reset())
|
if(file.isOpen() && file.reset())
|
||||||
{
|
{
|
||||||
MUtils::KeccakHash keccak;
|
MUtils::Hash::Keccak keccak;
|
||||||
|
|
||||||
const QByteArray data = file.readAll();
|
const QByteArray data = file.readAll();
|
||||||
const QByteArray seed = QByteArray::fromHex(g_seed);
|
const QByteArray seed = QByteArray::fromHex(g_seed);
|
||||||
const QByteArray salt = QByteArray::fromHex(g_salt);
|
const QByteArray salt = QByteArray::fromHex(g_salt);
|
||||||
|
|
||||||
if(keccak.init(MUtils::KeccakHash::hb384))
|
if(keccak.init(MUtils::Hash::Keccak::hb384))
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
ok = ok && keccak.addData(seed);
|
ok = ok && keccak.addData(seed);
|
||||||
@ -270,7 +270,7 @@ const QString &LockedFile::filePath()
|
|||||||
|
|
||||||
void LockedFile::selfTest()
|
void LockedFile::selfTest()
|
||||||
{
|
{
|
||||||
if(!MUtils::KeccakHash::selfTest())
|
if(!MUtils::Hash::Keccak::selfTest())
|
||||||
{
|
{
|
||||||
MUTILS_THROW("QKeccakHash self-test has failed!");
|
MUTILS_THROW("QKeccakHash self-test has failed!");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user