1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +00:00

LibCrypto: Implement HMAC

This commit is contained in:
AnotherTest 2020-04-08 01:54:50 +04:30 committed by Andreas Kling
parent 4f89a377a4
commit f2cd004d11
8 changed files with 249 additions and 3 deletions

View file

@ -26,6 +26,7 @@
#pragma once
#include <AK/String.h>
#include <AK/Types.h>
#include <LibCrypto/Hash/HashFunction.h>
@ -79,6 +80,8 @@ namespace Hash {
virtual void update(const StringView& string) override { update((const u8*)string.characters_without_null_termination(), string.length()); };
virtual DigestType digest() override;
virtual String class_name() const override { return "MD5"; }
inline static DigestType hash(const u8* data, size_t length)
{
MD5 md5;