2013-11-23 15:19:17 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Simple x264 Launcher
|
2015-01-31 19:56:04 +01:00
|
|
|
// Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
|
2013-11-23 15:19:17 +01:00
|
|
|
//
|
|
|
|
// 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 2 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.
|
|
|
|
//
|
|
|
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/*
|
|
|
|
BLAKE2 reference source code package - reference C implementations
|
|
|
|
|
|
|
|
Written in 2012 by Samuel Neves <sneves@dei.uc.pt>
|
|
|
|
|
|
|
|
To the extent possible under law, the author(s) have dedicated all copyright
|
|
|
|
and related and neighboring rights to this software to the public domain
|
|
|
|
worldwide. This software is distributed without any warranty.
|
|
|
|
|
|
|
|
You should have received a copy of the CC0 Public Domain Dedication along with
|
|
|
|
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QFile>
|
|
|
|
|
|
|
|
class QBlake2ChecksumContext;
|
|
|
|
|
|
|
|
class QBlake2Checksum
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
QBlake2Checksum(const char* key = NULL);
|
|
|
|
~QBlake2Checksum(void);
|
|
|
|
|
|
|
|
void update(const QByteArray &data);
|
|
|
|
void update(QFile &file);
|
|
|
|
QByteArray finalize(const bool bAsHex = true);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QByteArray m_hash;
|
|
|
|
QBlake2ChecksumContext *const m_context;
|
|
|
|
bool m_finalized;
|
|
|
|
};
|