1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

Lagom/Fuzzers: Add fuzzers for all current hashing functions

Namely MD5, SHA1, SHA256, SHA384 and SHA512.
This commit is contained in:
Luke 2021-06-18 16:31:31 +01:00 committed by Linus Groh
parent 4dc63896de
commit f29036dc98
6 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCrypto/Hash/SHA2.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
auto buffer = ByteBuffer::copy(data, size);
Crypto::Hash::SHA384::hash(buffer);
return 0;
}