CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-xxhash

Python binding for xxHash library providing fast non-cryptographic hash algorithms

Overall
score

80%

Evaluation80%

1.03x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-9/

Hash Algorithm Inspector

Build a utility that inspects and compares different hash algorithms by examining their properties and characteristics.

Capabilities

Hash Algorithm Information Reporting

  • Calling get_algorithm_info("xxh32") returns a dictionary with keys 'name', 'digest_size', and 'block_size' with correct values @test
  • Calling inspect_multiple_algorithms(["xxh32", "xxh64"]) returns a dictionary with two entries, each containing the algorithm's properties @test

Seed Verification

  • Calling verify_seed("xxh64", 12345) returns a dictionary with 'algorithm', 'seed', and 'matches' keys, where 'seed' is 12345 and 'matches' is True @test

Algorithm Comparison

  • Calling compare_algorithms("xxh32", "xxh64") returns a dictionary identifying "xxh64" as having the larger digest size @test

Implementation

@generates

API

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
    """
    pass

Dependencies { .dependencies }

xxhash { .dependency }

Provides fast non-cryptographic hash functions.

Install with Tessl CLI

npx tessl i tessl/pypi-xxhash

tile.json