2020-04-07 11:31:43 +04:30
|
|
|
/*
|
2021-04-23 00:43:01 +04:30
|
|
|
* Copyright (c) 2020, Ali Mohammad Pur <mpfard@serenityos.org>
|
2020-04-07 11:31:43 +04:30
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-04-07 11:31:43 +04:30
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#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>
|
2020-04-07 11:31:43 +04:30
|
|
|
|
2023-01-04 14:11:12 -05:00
|
|
|
namespace Crypto::Hash {
|
2020-04-07 14:42:27 +04:30
|
|
|
|
2024-12-20 09:11:10 +01:00
|
|
|
class MD5 final : public OpenSSLHashFunction<MD5, 512, 128> {
|
|
|
|
|
AK_MAKE_NONCOPYABLE(MD5);
|
2020-04-23 03:03:05 +04:30
|
|
|
|
|
|
|
|
public:
|
2025-01-12 17:17:51 +01:00
|
|
|
explicit MD5(EVP_MD_CTX* context);
|
2020-04-23 03:03:05 +04:30
|
|
|
|
2024-12-20 09:11:10 +01:00
|
|
|
virtual ByteString class_name() const override
|
2020-04-23 03:03:05 +04:30
|
|
|
{
|
2024-12-20 09:11:10 +01:00
|
|
|
return "MD5";
|
2020-04-23 03:03:05 +04:30
|
|
|
}
|
|
|
|
|
};
|
2020-04-07 11:31:43 +04:30
|
|
|
|
|
|
|
|
}
|