Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115872
crypto_hkdf_hmac_sha256_l32.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1004 B
Subscribers
None
crypto_hkdf_hmac_sha256_l32.cpp
View Options
// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include
<crypto/hkdf_sha256_32.h>
#include
<test/fuzz/FuzzedDataProvider.h>
#include
<test/fuzz/fuzz.h>
#include
<test/fuzz/util.h>
#include
<cstdint>
#include
<string>
#include
<vector>
FUZZ_TARGET
(
crypto_hkdf_hmac_sha256_l32
)
{
FuzzedDataProvider
fuzzed_data_provider
{
buffer
.
data
(),
buffer
.
size
()};
const
std
::
vector
<
uint8_t
>
initial_key_material
=
ConsumeRandomLengthByteVector
(
fuzzed_data_provider
);
CHKDF_HMAC_SHA256_L32
hkdf_hmac_sha256_l32
(
initial_key_material
.
data
(),
initial_key_material
.
size
(),
fuzzed_data_provider
.
ConsumeRandomLengthString
(
1024
));
while
(
fuzzed_data_provider
.
ConsumeBool
())
{
std
::
vector
<
uint8_t
>
out
(
32
);
hkdf_hmac_sha256_l32
.
Expand32
(
fuzzed_data_provider
.
ConsumeRandomLengthString
(
128
),
out
.
data
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Mar 2, 12:23 (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5167732
Default Alt Text
crypto_hkdf_hmac_sha256_l32.cpp (1004 B)
Attached To
rABC Bitcoin ABC
Event Timeline
Log In to Comment