2023-09-16 17:01:54 +04:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, the SerenityOS developers
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2024-06-17 23:12:53 +01:00
|
|
|
#include <AK/ByteString.h>
|
2024-12-20 09:11:10 +01:00
|
|
|
#include <LibCrypto/Hash/OpenSSLHashFunction.h>
|
2023-09-16 17:01:54 +04:00
|
|
|
|
|
|
|
|
namespace Crypto::Hash {
|
|
|
|
|
|
2024-12-20 09:11:10 +01:00
|
|
|
class BLAKE2b final : public OpenSSLHashFunction<BLAKE2b, 1024, 512> {
|
|
|
|
|
AK_MAKE_NONCOPYABLE(BLAKE2b);
|
2023-09-16 17:01:54 +04:00
|
|
|
|
|
|
|
|
public:
|
2025-01-12 17:17:51 +01:00
|
|
|
explicit BLAKE2b(EVP_MD_CTX* context);
|
2023-09-16 17:01:54 +04:00
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
virtual ByteString class_name() const override
|
2023-09-16 17:01:54 +04:00
|
|
|
{
|
|
|
|
|
return "BLAKE2b";
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|