axhash-core 1.0.0

Platform-agnostic AxHash core for Rust with no_std compatibility.
Documentation
pub(crate) const SECRET: [u64; 4] = [
    0x2d35_8dcc_aa6c_78a5,
    0x8bb8_4b93_962e_acc9,
    0x4b33_a62e_d433_d4a3,
    0x4d5a_2da5_1de1_aa47,
];

pub(crate) const STRIPE_SECRET: [u64; 4] = [
    0xa076_1d64_78bd_642f,
    0xe703_7ed1_a0b4_28db,
    0x8ebc_6af0_9c88_c6e3,
    0x5899_65cc_7537_4cc3,
];

pub(crate) const SECRET_STREAM_LEN: usize = 48;

pub(crate) const SECRET_STREAM: [u64; SECRET_STREAM_LEN] = build_secret_stream();

const fn build_secret_stream() -> [u64; SECRET_STREAM_LEN] {
    let mut out = [0u64; SECRET_STREAM_LEN];
    let mut state: u64 = STRIPE_SECRET[0];
    let mut i = 0;
    while i < SECRET_STREAM_LEN {
        state = state.wrapping_add(0x9E37_79B9_7F4A_7C15);
        let mut z = state;
        z = (z ^ (z >> 30)).wrapping_mul(0xBF58_476D_1CE4_E5B9);
        z = (z ^ (z >> 27)).wrapping_mul(0x94D0_49BB_1331_11EB);
        z ^= z >> 31;
        out[i] = z;
        i += 1;
    }
    out
}