mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
LibCrypto: Implement HMAC
This commit is contained in:
parent
4f89a377a4
commit
f2cd004d11
Notes:
sideshowbarker
2024-07-19 07:06:16 +09:00
Author: https://github.com/alimpfard
Commit: f2cd004d11
Pull-request: https://github.com/SerenityOS/serenity/pull/1661
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/itamar8910
8 changed files with 249 additions and 3 deletions
|
@ -26,6 +26,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCrypto/Cipher/Mode/Mode.h>
|
||||
|
||||
namespace Crypto {
|
||||
|
@ -40,6 +42,14 @@ namespace Cipher {
|
|||
{
|
||||
}
|
||||
|
||||
virtual String class_name() const override
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append(this->cipher().class_name());
|
||||
builder.append("_CBC");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
virtual Optional<ByteBuffer> encrypt(const ByteBuffer& in, ByteBuffer& out, Optional<ByteBuffer> ivec = {}) override
|
||||
{
|
||||
auto length = in.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue