retro-imager/src/acceleratedcryptographichash.h
Tom Dewey d9082f8abd AcceleratedCryptographicHash: Use platform capabilities
Introduce a CNG version for Windows, a CommonCrypto
version for macOS and a GnuTLS version for Linux, as
we're using gnutls _anyway_.
2024-09-11 17:12:48 +01:00

26 lines
599 B
C++

#ifndef ACCELERATEDCRYPTOGRAPHICHASH_H
#define ACCELERATEDCRYPTOGRAPHICHASH_H
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2020 Raspberry Pi Ltd
*/
#include <QCryptographicHash>
#include <memory>
struct AcceleratedCryptographicHash
{
private:
struct impl;
std::unique_ptr<impl> p_Impl;
public:
explicit AcceleratedCryptographicHash(QCryptographicHash::Algorithm method);
~AcceleratedCryptographicHash();
void addData(const char *data, int length);
void addData(const QByteArray &data);
QByteArray result();
};
#endif // ACCELERATEDCRYPTOGRAPHICHASH_H