diff --git a/fuzz/fuzz_targets/area_rel_area_encoding.rs b/fuzz/fuzz_targets/area_rel_area_encoding.rs index 3c72156..944cac8 100644 --- a/fuzz/fuzz_targets/area_rel_area_encoding.rs +++ b/fuzz/fuzz_targets/area_rel_area_encoding.rs @@ -4,7 +4,7 @@ use earthstar::identity_id::IdentityIdentifier as IdentityId; use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::grouping::Area; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; fuzz_target!(|data: ( Area<16, 16, 16, IdentityId>, @@ -17,7 +17,7 @@ fuzz_target!(|data: ( return; } - relative_encoding_roundtrip::< + relative_encoding_canonical_roundtrip::< Area<16, 16, 16, IdentityId>, Area<16, 16, 16, IdentityId>, TestConsumer, diff --git a/fuzz/fuzz_targets/entry_encoding.rs b/fuzz/fuzz_targets/entry_encoding.rs index 024442b..9c51506 100644 --- a/fuzz/fuzz_targets/entry_encoding.rs +++ b/fuzz/fuzz_targets/entry_encoding.rs @@ -5,7 +5,7 @@ use earthstar::namespace_id::NamespaceIdentifier as EsNamespaceId; use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Entry; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; use willow_fuzz::placeholder_params::FakePayloadDigest; fuzz_target!(|data: ( @@ -14,5 +14,5 @@ fuzz_target!(|data: ( )| { let (entry, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(entry, &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(entry, &mut consumer); }); diff --git a/fuzz/fuzz_targets/entry_encoding_random.rs b/fuzz/fuzz_targets/entry_encoding_random.rs index 82a85bc..a81d329 100644 --- a/fuzz/fuzz_targets/entry_encoding_random.rs +++ b/fuzz/fuzz_targets/entry_encoding_random.rs @@ -6,8 +6,8 @@ use earthstar::namespace_id::NamespaceIdentifier as EsNamespaceId; use willow_data_model::Entry; use libfuzzer_sys::fuzz_target; -use willow_fuzz::{encode::encoding_random, placeholder_params::FakePayloadDigest}; +use willow_fuzz::{encode::encoding_canonical_random, placeholder_params::FakePayloadDigest}; fuzz_target!(|data: &[u8]| { - encoding_random::>(data); + encoding_canonical_random::>(data); }); diff --git a/fuzz/fuzz_targets/entry_rel_entry_encoding.rs b/fuzz/fuzz_targets/entry_rel_entry_encoding.rs index d1fd8a4..428744a 100644 --- a/fuzz/fuzz_targets/entry_rel_entry_encoding.rs +++ b/fuzz/fuzz_targets/entry_rel_entry_encoding.rs @@ -5,7 +5,7 @@ use earthstar::namespace_id::NamespaceIdentifier as EsNamespaceId; use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Entry; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; use willow_fuzz::placeholder_params::FakePayloadDigest; fuzz_target!(|data: ( @@ -15,7 +15,7 @@ fuzz_target!(|data: ( )| { let (entry_sub, entry_ref, mut consumer) = data; - relative_encoding_roundtrip::< + relative_encoding_canonical_roundtrip::< Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>, Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>, TestConsumer, diff --git a/fuzz/fuzz_targets/entry_rel_namespace_area_encoding.rs b/fuzz/fuzz_targets/entry_rel_namespace_area_encoding.rs index 7f6b16e..8f4943b 100644 --- a/fuzz/fuzz_targets/entry_rel_namespace_area_encoding.rs +++ b/fuzz/fuzz_targets/entry_rel_namespace_area_encoding.rs @@ -6,7 +6,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::grouping::Area; use willow_data_model::Entry; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; use willow_fuzz::placeholder_params::FakePayloadDigest; fuzz_target!(|data: ( @@ -22,7 +22,7 @@ fuzz_target!(|data: ( let namespace = entry.namespace_id().clone(); - relative_encoding_roundtrip::< + relative_encoding_canonical_roundtrip::< Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>, (EsNamespaceId, Area<16, 16, 16, IdentityId>), TestConsumer, diff --git a/fuzz/fuzz_targets/entry_rel_namespace_range_encoding.rs b/fuzz/fuzz_targets/entry_rel_namespace_range_encoding.rs index 6a13e3a..2057269 100644 --- a/fuzz/fuzz_targets/entry_rel_namespace_range_encoding.rs +++ b/fuzz/fuzz_targets/entry_rel_namespace_range_encoding.rs @@ -6,7 +6,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::grouping::Range3d; use willow_data_model::Entry; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; use willow_fuzz::placeholder_params::FakePayloadDigest; fuzz_target!(|data: ( @@ -22,7 +22,7 @@ fuzz_target!(|data: ( let namespace = entry.namespace_id().clone(); - relative_encoding_roundtrip::< + relative_encoding_canonical_roundtrip::< Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>, (EsNamespaceId, Range3d<16, 16, 16, IdentityId>), TestConsumer, diff --git a/fuzz/fuzz_targets/mc_capability_rel_area_encoding.rs b/fuzz/fuzz_targets/mc_capability_rel_area_encoding.rs index ea40b85..774ae64 100644 --- a/fuzz/fuzz_targets/mc_capability_rel_area_encoding.rs +++ b/fuzz/fuzz_targets/mc_capability_rel_area_encoding.rs @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target; use meadowcap::McCapability; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::grouping::Area; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig}; fuzz_target!(|data: ( @@ -38,7 +38,7 @@ fuzz_target!(|data: ( return; } - relative_encoding_roundtrip::< + relative_encoding_canonical_roundtrip::< McCapability<3, 3, 3, SillyPublicKey, SillySig, SillyPublicKey, SillySig>, Area<3, 3, 3, SillyPublicKey>, TestConsumer, diff --git a/fuzz/fuzz_targets/mc_capability_rel_area_encoding_random.rs b/fuzz/fuzz_targets/mc_capability_rel_area_encoding_random.rs index 237922f..92e5922 100644 --- a/fuzz/fuzz_targets/mc_capability_rel_area_encoding_random.rs +++ b/fuzz/fuzz_targets/mc_capability_rel_area_encoding_random.rs @@ -3,13 +3,13 @@ use libfuzzer_sys::fuzz_target; use meadowcap::McCapability; use willow_data_model::grouping::Area; -use willow_fuzz::encode::relative_encoding_random; +use willow_fuzz::encode::relative_encoding_canonical_random; use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig}; fuzz_target!(|data: (&[u8], Area<3, 3, 3, SillyPublicKey>,)| { let (random_bytes, out) = data; - relative_encoding_random::< + relative_encoding_canonical_random::< Area<3, 3, 3, SillyPublicKey>, McCapability<3, 3, 3, SillyPublicKey, SillySig, SillyPublicKey, SillySig>, >(out, random_bytes) diff --git a/fuzz/fuzz_targets/mc_subspace_capability_encoding.rs b/fuzz/fuzz_targets/mc_subspace_capability_encoding.rs index 542d92f..ddf82ce 100644 --- a/fuzz/fuzz_targets/mc_subspace_capability_encoding.rs +++ b/fuzz/fuzz_targets/mc_subspace_capability_encoding.rs @@ -3,7 +3,7 @@ use libfuzzer_sys::fuzz_target; use meadowcap::McSubspaceCapability; use ufotofu::local_nb::consumer::TestConsumer; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig}; fuzz_target!(|data: ( @@ -23,7 +23,7 @@ fuzz_target!(|data: ( last_receiver = delegee; } - encoding_roundtrip::< + encoding_canonical_roundtrip::< McSubspaceCapability, TestConsumer, >(cap_with_delegees, &mut consumer) diff --git a/fuzz/fuzz_targets/mc_subspace_capability_encoding_random.rs b/fuzz/fuzz_targets/mc_subspace_capability_encoding_random.rs index 42fe05a..72c0d28 100644 --- a/fuzz/fuzz_targets/mc_subspace_capability_encoding_random.rs +++ b/fuzz/fuzz_targets/mc_subspace_capability_encoding_random.rs @@ -2,11 +2,11 @@ use libfuzzer_sys::fuzz_target; use meadowcap::McSubspaceCapability; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig}; fuzz_target!(|data: &[u8]| { - encoding_random::>( - data, - ) + encoding_canonical_random::< + McSubspaceCapability, + >(data) }); diff --git a/fuzz/fuzz_targets/path_encoding.rs b/fuzz/fuzz_targets/path_encoding.rs index 959cced..719a18e 100644 --- a/fuzz/fuzz_targets/path_encoding.rs +++ b/fuzz/fuzz_targets/path_encoding.rs @@ -3,7 +3,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Path; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; const MCL: usize = 300; const MCC: usize = 300; @@ -12,5 +12,5 @@ const MPL: usize = 300; fuzz_target!(|data: (Path, TestConsumer)| { let (path, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(path, &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(path, &mut consumer); }); diff --git a/fuzz/fuzz_targets/path_encoding2.rs b/fuzz/fuzz_targets/path_encoding2.rs index 4583a2b..58ff7ac 100644 --- a/fuzz/fuzz_targets/path_encoding2.rs +++ b/fuzz/fuzz_targets/path_encoding2.rs @@ -3,7 +3,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Path; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; const MCL: usize = 2; const MCC: usize = 3; @@ -12,5 +12,5 @@ const MPL: usize = 3; fuzz_target!(|data: (Path, TestConsumer)| { let (path, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(path, &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(path, &mut consumer); }); diff --git a/fuzz/fuzz_targets/path_encoding3.rs b/fuzz/fuzz_targets/path_encoding3.rs index 1787ff7..7ac9435 100644 --- a/fuzz/fuzz_targets/path_encoding3.rs +++ b/fuzz/fuzz_targets/path_encoding3.rs @@ -3,7 +3,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Path; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; const MCL: usize = 4; const MCC: usize = 4; @@ -12,5 +12,5 @@ const MPL: usize = 16; fuzz_target!(|data: (Path, TestConsumer)| { let (path, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(path, &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(path, &mut consumer); }); diff --git a/fuzz/fuzz_targets/path_encoding_random.rs b/fuzz/fuzz_targets/path_encoding_random.rs index 3b3b704..21b1263 100644 --- a/fuzz/fuzz_targets/path_encoding_random.rs +++ b/fuzz/fuzz_targets/path_encoding_random.rs @@ -2,12 +2,12 @@ use libfuzzer_sys::fuzz_target; use willow_data_model::Path; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; const MCL: usize = 300; const MCC: usize = 300; const MPL: usize = 300; fuzz_target!(|data: &[u8]| { - encoding_random::>(data); + encoding_canonical_random::>(data); }); diff --git a/fuzz/fuzz_targets/path_encoding_random2.rs b/fuzz/fuzz_targets/path_encoding_random2.rs index a08464a..ba00c14 100644 --- a/fuzz/fuzz_targets/path_encoding_random2.rs +++ b/fuzz/fuzz_targets/path_encoding_random2.rs @@ -2,12 +2,12 @@ use libfuzzer_sys::fuzz_target; use willow_data_model::Path; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; const MCL: usize = 2; const MCC: usize = 3; const MPL: usize = 3; fuzz_target!(|data: &[u8]| { - encoding_random::>(data); + encoding_canonical_random::>(data); }); diff --git a/fuzz/fuzz_targets/path_encoding_random3.rs b/fuzz/fuzz_targets/path_encoding_random3.rs index bd879ff..10ab01c 100644 --- a/fuzz/fuzz_targets/path_encoding_random3.rs +++ b/fuzz/fuzz_targets/path_encoding_random3.rs @@ -2,12 +2,12 @@ use libfuzzer_sys::fuzz_target; use willow_data_model::Path; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; const MCL: usize = 4; const MCC: usize = 4; const MPL: usize = 16; fuzz_target!(|data: &[u8]| { - encoding_random::>(data); + encoding_canonical_random::>(data); }); diff --git a/fuzz/fuzz_targets/path_rel_path_encoding.rs b/fuzz/fuzz_targets/path_rel_path_encoding.rs index 1c14c10..80e00bb 100644 --- a/fuzz/fuzz_targets/path_rel_path_encoding.rs +++ b/fuzz/fuzz_targets/path_rel_path_encoding.rs @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Path; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; const MCL: usize = 300; const MCC: usize = 300; @@ -17,9 +17,9 @@ fuzz_target!(|data: ( )| { let (path_sub, path_ref, mut consumer) = data; - relative_encoding_roundtrip::, Path, TestConsumer>( - path_sub, - path_ref, - &mut consumer, - ) + relative_encoding_canonical_roundtrip::< + Path, + Path, + TestConsumer, + >(path_sub, path_ref, &mut consumer) }); diff --git a/fuzz/fuzz_targets/path_rel_path_encoding2.rs b/fuzz/fuzz_targets/path_rel_path_encoding2.rs index 030e361..ccec8d4 100644 --- a/fuzz/fuzz_targets/path_rel_path_encoding2.rs +++ b/fuzz/fuzz_targets/path_rel_path_encoding2.rs @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Path; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; const MCL: usize = 2; const MCC: usize = 3; @@ -17,9 +17,9 @@ fuzz_target!(|data: ( )| { let (path_sub, path_ref, mut consumer) = data; - relative_encoding_roundtrip::, Path, TestConsumer>( - path_sub, - path_ref, - &mut consumer, - ) + relative_encoding_canonical_roundtrip::< + Path, + Path, + TestConsumer, + >(path_sub, path_ref, &mut consumer) }); diff --git a/fuzz/fuzz_targets/path_rel_path_encoding3.rs b/fuzz/fuzz_targets/path_rel_path_encoding3.rs index e7cbd4b..3a55324 100644 --- a/fuzz/fuzz_targets/path_rel_path_encoding3.rs +++ b/fuzz/fuzz_targets/path_rel_path_encoding3.rs @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::Path; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; const MCL: usize = 4; const MCC: usize = 4; @@ -17,9 +17,9 @@ fuzz_target!(|data: ( )| { let (path_sub, path_ref, mut consumer) = data; - relative_encoding_roundtrip::, Path, TestConsumer>( - path_sub, - path_ref, - &mut consumer, - ) + relative_encoding_canonical_roundtrip::< + Path, + Path, + TestConsumer, + >(path_sub, path_ref, &mut consumer) }); diff --git a/fuzz/fuzz_targets/path_rel_path_encoding_random.rs b/fuzz/fuzz_targets/path_rel_path_encoding_random.rs index 23a216f..4ddd01b 100644 --- a/fuzz/fuzz_targets/path_rel_path_encoding_random.rs +++ b/fuzz/fuzz_targets/path_rel_path_encoding_random.rs @@ -2,7 +2,7 @@ use libfuzzer_sys::fuzz_target; use willow_data_model::Path; -use willow_fuzz::encode::relative_encoding_random; +use willow_fuzz::encode::relative_encoding_canonical_random; const MCL: usize = 300; const MCC: usize = 300; @@ -11,5 +11,8 @@ const MPL: usize = 300; fuzz_target!(|data: (&[u8], Path)| { let (random_bytes, ref_path) = data; - relative_encoding_random::, Path>(ref_path, random_bytes) + relative_encoding_canonical_random::, Path>( + ref_path, + random_bytes, + ) }); diff --git a/fuzz/fuzz_targets/path_rel_path_encoding_random2.rs b/fuzz/fuzz_targets/path_rel_path_encoding_random2.rs index 5d674bb..b473cfa 100644 --- a/fuzz/fuzz_targets/path_rel_path_encoding_random2.rs +++ b/fuzz/fuzz_targets/path_rel_path_encoding_random2.rs @@ -2,7 +2,7 @@ use libfuzzer_sys::fuzz_target; use willow_data_model::Path; -use willow_fuzz::encode::relative_encoding_random; +use willow_fuzz::encode::relative_encoding_canonical_random; const MCL: usize = 2; const MCC: usize = 3; @@ -11,5 +11,8 @@ const MPL: usize = 3; fuzz_target!(|data: (&[u8], Path)| { let (random_bytes, ref_path) = data; - relative_encoding_random::, Path>(ref_path, random_bytes) + relative_encoding_canonical_random::, Path>( + ref_path, + random_bytes, + ) }); diff --git a/fuzz/fuzz_targets/path_rel_path_encoding_random3.rs b/fuzz/fuzz_targets/path_rel_path_encoding_random3.rs index 0f2a66d..175efcf 100644 --- a/fuzz/fuzz_targets/path_rel_path_encoding_random3.rs +++ b/fuzz/fuzz_targets/path_rel_path_encoding_random3.rs @@ -2,7 +2,7 @@ use libfuzzer_sys::fuzz_target; use willow_data_model::Path; -use willow_fuzz::encode::relative_encoding_random; +use willow_fuzz::encode::relative_encoding_canonical_random; const MCL: usize = 4; const MCC: usize = 4; @@ -11,5 +11,8 @@ const MPL: usize = 16; fuzz_target!(|data: (&[u8], Path)| { let (random_bytes, ref_path) = data; - relative_encoding_random::, Path>(ref_path, random_bytes) + relative_encoding_canonical_random::, Path>( + ref_path, + random_bytes, + ) }); diff --git a/fuzz/fuzz_targets/range3d_rel_range3d_encoding.rs b/fuzz/fuzz_targets/range3d_rel_range3d_encoding.rs index 073ada4..8ff774f 100644 --- a/fuzz/fuzz_targets/range3d_rel_range3d_encoding.rs +++ b/fuzz/fuzz_targets/range3d_rel_range3d_encoding.rs @@ -4,7 +4,7 @@ use earthstar::identity_id::IdentityIdentifier as IdentityId; use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_data_model::grouping::Range3d; -use willow_fuzz::encode::relative_encoding_roundtrip; +use willow_fuzz::encode::relative_encoding_canonical_roundtrip; fuzz_target!(|data: ( Range3d<16, 16, 16, IdentityId>, @@ -13,7 +13,7 @@ fuzz_target!(|data: ( )| { let (ran, reference, mut consumer) = data; - relative_encoding_roundtrip::< + relative_encoding_canonical_roundtrip::< Range3d<16, 16, 16, IdentityId>, Range3d<16, 16, 16, IdentityId>, TestConsumer, diff --git a/fuzz/fuzz_targets/u16be_encoding.rs b/fuzz/fuzz_targets/u16be_encoding.rs index fd4353a..8816a83 100644 --- a/fuzz/fuzz_targets/u16be_encoding.rs +++ b/fuzz/fuzz_targets/u16be_encoding.rs @@ -3,10 +3,10 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_encoding::U16BE; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; fuzz_target!(|data: (u16, TestConsumer)| { let (n, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(U16BE::from(n), &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(U16BE::from(n), &mut consumer); }); diff --git a/fuzz/fuzz_targets/u16be_encoding_random.rs b/fuzz/fuzz_targets/u16be_encoding_random.rs index 0895fc3..9bb5829 100644 --- a/fuzz/fuzz_targets/u16be_encoding_random.rs +++ b/fuzz/fuzz_targets/u16be_encoding_random.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use willow_encoding::U16BE; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; fuzz_target!(|data: &[u8]| { - encoding_random::(data); + encoding_canonical_random::(data); }); diff --git a/fuzz/fuzz_targets/u32be_encoding.rs b/fuzz/fuzz_targets/u32be_encoding.rs index 38b23bf..7a0170c 100644 --- a/fuzz/fuzz_targets/u32be_encoding.rs +++ b/fuzz/fuzz_targets/u32be_encoding.rs @@ -3,10 +3,10 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_encoding::U32BE; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; fuzz_target!(|data: (u32, TestConsumer)| { let (n, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(U32BE::from(n), &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(U32BE::from(n), &mut consumer); }); diff --git a/fuzz/fuzz_targets/u32be_encoding_random.rs b/fuzz/fuzz_targets/u32be_encoding_random.rs index 7b07bcd..0e666f2 100644 --- a/fuzz/fuzz_targets/u32be_encoding_random.rs +++ b/fuzz/fuzz_targets/u32be_encoding_random.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use willow_encoding::U32BE; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; fuzz_target!(|data: &[u8]| { - encoding_random::(data); + encoding_canonical_random::(data); }); diff --git a/fuzz/fuzz_targets/u64be_encoding.rs b/fuzz/fuzz_targets/u64be_encoding.rs index 56435da..5198cfc 100644 --- a/fuzz/fuzz_targets/u64be_encoding.rs +++ b/fuzz/fuzz_targets/u64be_encoding.rs @@ -3,10 +3,10 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_encoding::U64BE; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; fuzz_target!(|data: (u64, TestConsumer)| { let (n, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(U64BE::from(n), &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(U64BE::from(n), &mut consumer); }); diff --git a/fuzz/fuzz_targets/u64be_encoding_random.rs b/fuzz/fuzz_targets/u64be_encoding_random.rs index a2532f2..d1ea8aa 100644 --- a/fuzz/fuzz_targets/u64be_encoding_random.rs +++ b/fuzz/fuzz_targets/u64be_encoding_random.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use willow_encoding::U64BE; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; fuzz_target!(|data: &[u8]| { - encoding_random::(data); + encoding_canonical_random::(data); }); diff --git a/fuzz/fuzz_targets/u8be_encoding.rs b/fuzz/fuzz_targets/u8be_encoding.rs index 766102d..faad12e 100644 --- a/fuzz/fuzz_targets/u8be_encoding.rs +++ b/fuzz/fuzz_targets/u8be_encoding.rs @@ -3,10 +3,10 @@ use libfuzzer_sys::fuzz_target; use ufotofu::local_nb::consumer::TestConsumer; use willow_encoding::U8BE; -use willow_fuzz::encode::encoding_roundtrip; +use willow_fuzz::encode::encoding_canonical_roundtrip; fuzz_target!(|data: (u8, TestConsumer)| { let (n, mut consumer) = data; - encoding_roundtrip::<_, TestConsumer>(U8BE::from(n), &mut consumer); + encoding_canonical_roundtrip::<_, TestConsumer>(U8BE::from(n), &mut consumer); }); diff --git a/fuzz/fuzz_targets/u8be_encoding_random.rs b/fuzz/fuzz_targets/u8be_encoding_random.rs index a8bce9e..f044b25 100644 --- a/fuzz/fuzz_targets/u8be_encoding_random.rs +++ b/fuzz/fuzz_targets/u8be_encoding_random.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use willow_encoding::U8BE; -use willow_fuzz::encode::encoding_random; +use willow_fuzz::encode::encoding_canonical_random; fuzz_target!(|data: &[u8]| { - encoding_random::(data); + encoding_canonical_random::(data); }); diff --git a/fuzz/src/encode.rs b/fuzz/src/encode.rs index 0d80bf0..22965f5 100644 --- a/fuzz/src/encode.rs +++ b/fuzz/src/encode.rs @@ -12,7 +12,7 @@ use willow_encoding::{ DecodeError, }; -pub fn encoding_roundtrip(item: T, consumer: &mut TestConsumer) +pub fn encoding_canonical_roundtrip(item: T, consumer: &mut TestConsumer) where T: Encodable + Decodable + std::fmt::Debug + PartialEq + Eq, C: BulkConsumer, @@ -38,7 +38,7 @@ where assert_eq!(decoded_item, item); } -pub fn encoding_random(data: &[u8]) +pub fn encoding_canonical_random(data: &[u8]) where T: Encodable + Decodable + std::fmt::Debug, { @@ -112,7 +112,7 @@ where }; } -pub fn relative_encoding_roundtrip( +pub fn relative_encoding_canonical_roundtrip( subject: T, reference: R, consumer: &mut TestConsumer, @@ -145,7 +145,7 @@ pub fn relative_encoding_roundtrip( assert_eq!(decoded_item, subject); } -pub fn relative_encoding_random(reference: R, data: &[u8]) +pub fn relative_encoding_canonical_random(reference: R, data: &[u8]) where T: RelativeEncodable + RelativeDecodable + std::fmt::Debug, R: std::fmt::Debug,