2020-05-23 17:50:59 +02:00
|
|
|
#ifndef ACCELERATEDCRYPTOGRAPHICHASH_H
|
|
|
|
#define ACCELERATEDCRYPTOGRAPHICHASH_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2022-02-03 11:48:21 +01:00
|
|
|
* Copyright (C) 2020 Raspberry Pi Ltd
|
2020-05-23 17:50:59 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <QCryptographicHash>
|
2024-07-30 15:03:11 +01:00
|
|
|
#include <memory>
|
2020-05-25 00:36:16 +02:00
|
|
|
|
2024-07-30 15:03:11 +01:00
|
|
|
struct AcceleratedCryptographicHash
|
2020-05-23 17:50:59 +02:00
|
|
|
{
|
2024-07-30 15:03:11 +01:00
|
|
|
private:
|
|
|
|
struct impl;
|
|
|
|
std::unique_ptr<impl> p_Impl;
|
|
|
|
|
2020-05-23 17:50:59 +02:00
|
|
|
public:
|
|
|
|
explicit AcceleratedCryptographicHash(QCryptographicHash::Algorithm method);
|
2024-07-30 15:03:11 +01:00
|
|
|
~AcceleratedCryptographicHash();
|
2020-05-23 17:50:59 +02:00
|
|
|
void addData(const char *data, int length);
|
|
|
|
void addData(const QByteArray &data);
|
|
|
|
QByteArray result();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ACCELERATEDCRYPTOGRAPHICHASH_H
|