[][src]Function ironcore_search_helpers::generate_hashes_for_string_with_padding

pub fn generate_hashes_for_string_with_padding<R: Rng + CryptoRng>(
    s: &str,
    partition_id: Option<&str>,
    salt: &[u8],
    rng: &Mutex<R>
) -> Result<HashSet<u32>, String>

Make an index, for the string s considering all tri-grams. The string will be latinised, lowercased and stripped of special chars before being broken into tri-grams. The values will be prefixed with partition_id and salt before being hashed. Each entry in the HashSet will be truncated to 32 bits and will be encoded as a big endian number. This function will also add some random entries to the HashSet to not expose how many tri-grams were actually found.