-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Redo module and feature structure for v4/v4.2 split
- Loading branch information
1 parent
34512d3
commit d46a84c
Showing
19 changed files
with
1,038 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,6 @@ | ||
#[cfg(not(feature = "v4_2"))] | ||
mod v4 { | ||
pub(crate) const WY0: u64 = 0xa076_1d64_78bd_642f; | ||
pub(crate) const WY1: u64 = 0xe703_7ed1_a0b4_28db; | ||
#[cfg(feature = "wyhash")] | ||
pub(crate) const WY2: u64 = 0x8ebc_6af0_9c88_c6e3; | ||
#[cfg(feature = "wyhash")] | ||
pub(crate) const WY3: u64 = 0x5899_65cc_7537_4cc3; | ||
} | ||
|
||
#[cfg(feature = "v4_2")] | ||
mod v4_2 { | ||
pub(crate) const WY0: u64 = 0x2d35_8dcc_aa6c_78a5; | ||
pub(crate) const WY1: u64 = 0x8bb8_4b93_962e_acc9; | ||
#[cfg(feature = "wyhash")] | ||
pub(crate) const WY2: u64 = 0x4b33_a62e_d433_d4a3; | ||
#[cfg(feature = "wyhash")] | ||
pub(crate) const WY3: u64 = 0x4d5a_2da5_1de1_aa47; | ||
} | ||
|
||
#[cfg(not(feature = "v4_2"))] | ||
pub(crate) use v4::*; | ||
|
||
#[cfg(feature = "v4_2")] | ||
pub(crate) use v4_2::*; | ||
pub(crate )const C_VALUES: &[u8] = &[ | ||
15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 71, 75, 77, 78, 83, 85, 86, 89, 90, | ||
92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 135, 139, 141, 142, 147, 149, 150, 153, | ||
154, 156, 163, 165, 166, 169, 170, 172, 177, 178, 180, 184, 195, 197, 198, 201, 202, 204, 209, | ||
210, 212, 216, 225, 226, 228, 232, 240, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#[cfg(feature = "randomised_wyhash")] | ||
mod builder; | ||
mod constants; | ||
#[cfg(feature = "wyhash")] | ||
mod hasher; | ||
#[cfg(feature = "wyhash")] | ||
mod primes; | ||
#[cfg(feature = "wyhash")] | ||
mod secret; | ||
mod wyrand; | ||
|
||
#[cfg(feature = "randomised_wyhash")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "randomised_wyhash")))] | ||
pub use builder::RandomWyHashState; | ||
|
||
#[cfg(feature = "wyhash")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "wyhash")))] | ||
pub use hasher::WyHash; | ||
|
||
#[cfg(feature = "wyhash")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "wyhash")))] | ||
pub use secret::Secret; | ||
|
||
pub use wyrand::WyRand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pub(super) const WY0: u64 = 0x2d35_8dcc_aa6c_78a5; | ||
pub(super) const WY1: u64 = 0x8bb8_4b93_962e_acc9; | ||
#[cfg(feature = "wyhash")] | ||
pub(super) const WY2: u64 = 0x4b33_a62e_d433_d4a3; | ||
#[cfg(feature = "wyhash")] | ||
pub(super) const WY3: u64 = 0x4d5a_2da5_1de1_aa47; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.