org.xlattice.crypto.filters

## Interface KeySelector.BitSelector

- All Known Implementing Classes:
    KeySelector.GenericBitSelector
  Enclosing class:
    KeySelector

      public static interface KeySelector.BitSelector

  Interface for extracting bit offsets from cryptographic keys for Bloom filter operations.

  Bit selectors are used to determine which bits in a key should be examined or set when performing Bloom filter operations. Each bit offset represents a specific bit position within the key that will be used by one of the k hash functions in the Bloom filter.

  The bit selection algorithm extracts k bit positions from the key, where each bit position corresponds to a specific hash function's target bit in the filter's bit array. This enables efficient mapping from key data to Bloom filter bit positions.

  Implementations must be thread-safe as they may be used concurrently by multiple threads accessing the same Bloom filter.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `getBitSelectors(byte[] b, int offset, int length, int[] bitOffset)` Extracts k bit offsets from a key for Bloom filter operations.

- - ### Method Detail

    - #### getBitSelectors

          void getBitSelectors(byte[] b,
                               int offset,
                               int length,
                               int[] bitOffset)

      Extracts k bit offsets from a key for Bloom filter operations.

      This method populates the provided bitOffset array with k integer values, each representing a bit position within the key that should be used by a hash function. The bit positions are calculated based on the key data and the specific bit selection algorithm.

      The offset and length parameters allow processing of subsets of the key data, enabling flexible key handling for different key sizes and Bloom filter configurations.

      Parameters:
        `b` - the key data as byte array
        `offset` - starting position within the key array
        `length` - number of bytes to process from the key
        `bitOffset` - output array of length k to store calculated bit offsets