Python binding for xxHash library providing fast non-cryptographic hash algorithms
Overall
score
80%
Evaluation — 80%
↑ 1.03xAgent success when using this tile
Build a utility that inspects and compares different hash algorithms by examining their properties and characteristics.
get_algorithm_info("xxh32") returns a dictionary with keys 'name', 'digest_size', and 'block_size' with correct values @testinspect_multiple_algorithms(["xxh32", "xxh64"]) returns a dictionary with two entries, each containing the algorithm's properties @testverify_seed("xxh64", 12345) returns a dictionary with 'algorithm', 'seed', and 'matches' keys, where 'seed' is 12345 and 'matches' is True @testcompare_algorithms("xxh32", "xxh64") returns a dictionary identifying "xxh64" as having the larger digest size @test@generates
def get_algorithm_info(algorithm_name: str) -> dict:
"""
Get information about a hash algorithm.
Args:
algorithm_name: Name of the hash algorithm (e.g., "xxh32", "xxh64")
Returns:
Dictionary containing:
- 'name': algorithm name
- 'digest_size': size of hash output in bytes
- 'block_size': internal block size in bytes
"""
pass
def inspect_multiple_algorithms(algorithm_names: list) -> dict:
"""
Inspect multiple hash algorithms and return their properties.
Args:
algorithm_names: List of algorithm names to inspect
Returns:
Dictionary mapping algorithm names to their info dictionaries
"""
pass
def verify_seed(algorithm_name: str, seed: int) -> dict:
"""
Create a hasher with a specific seed and verify the seed property.
Args:
algorithm_name: Name of the hash algorithm
seed: Seed value to use
Returns:
Dictionary containing:
- 'algorithm': algorithm name
- 'seed': the seed value from the hasher's seed property
- 'matches': boolean indicating if seed matches expected value
"""
pass
def compare_algorithms(algo1: str, algo2: str) -> dict:
"""
Compare two hash algorithms based on their properties.
Args:
algo1: First algorithm name
algo2: Second algorithm name
Returns:
Dictionary containing:
- 'larger_digest': name of algorithm with larger digest_size
- 'larger_block': name of algorithm with larger block_size
- 'algo1_info': info dict for first algorithm
- 'algo2_info': info dict for second algorithm
"""
passProvides fast non-cryptographic hash functions.
Install with Tessl CLI
npx tessl i tessl/pypi-xxhashdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10