/* * SPDX-License-Identifier: GPL-3.0-or-later * SPDX-FileCopyrightText: 2020 Johan Ouwerkerk */ #ifndef HMAC_H #define HMAC_H #include #include #include namespace hmac { std::optional blockSize(QCryptographicHash::Algorithm algorithm); std::optional outputSize(QCryptographicHash::Algorithm algorithm); bool validateKeySize(QCryptographicHash::Algorithm algorithm, int ksize, bool requireSaneKeyLength = false); std::optional compute(QCryptographicHash::Algorithm algorithm, char *rawKey, int ksize, const QByteArray &message, bool requireSaneKeyLength = false); } #endif