MCPcopy Create free account
hub / github.com/ElementsProject/elements / FUZZ_TARGET

Function FUZZ_TARGET

src/test/fuzz/crypto_poly1305.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <vector>
12
13FUZZ_TARGET(crypto_poly1305)
14{
15 FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
16
17 const std::vector<uint8_t> key = ConsumeFixedLengthByteVector(fuzzed_data_provider, POLY1305_KEYLEN);
18 const std::vector<uint8_t> in = ConsumeRandomLengthByteVector(fuzzed_data_provider);
19
20 std::vector<uint8_t> tag_out(POLY1305_TAGLEN);
21 poly1305_auth(tag_out.data(), in.data(), in.size(), key.data());
22}

Callers

nothing calls this directly

Calls 5

poly1305_authFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected