File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 16
16
#include < script/signingprovider.h>
17
17
#include < script/standard.h>
18
18
#include < streams.h>
19
+ #include < test/fuzz/FuzzedDataProvider.h>
19
20
#include < test/fuzz/fuzz.h>
20
21
#include < util/strencodings.h>
21
22
23
+ #include < array>
22
24
#include < cassert>
23
25
#include < cstdint>
24
26
#include < numeric>
@@ -304,3 +306,19 @@ FUZZ_TARGET_INIT(key, initialize_key)
304
306
}
305
307
}
306
308
}
309
+
310
+ FUZZ_TARGET_INIT (ellswift, initialize_key)
311
+ {
312
+ FuzzedDataProvider fdp{buffer.data (), buffer.size ()};
313
+ auto key_bytes = fdp.ConsumeBytes <uint8_t >(32 );
314
+ key_bytes.resize (32 );
315
+ CKey key;
316
+ key.Set (key_bytes.begin (), key_bytes.end (), fdp.ConsumeBool ());
317
+
318
+ auto rnd32 = fdp.ConsumeBytes <uint8_t >(32 );
319
+ rnd32.resize (32 );
320
+ std::array<uint8_t , 32 > rnd32_array;
321
+ std::copy (rnd32.begin (), rnd32.end (), rnd32_array.begin ());
322
+
323
+ (void )key.EllSwiftEncode (rnd32_array);
324
+ }
You can’t perform that action at this time.
0 commit comments