{"library":"crc32c","code":"import crc32c\n\n# Calculate CRC32C for a byte string\ndata = b\"hello world\"\nchecksum = crc32c.crc32c(data)\nprint(f\"CRC32C checksum of '{data.decode()}': {checksum}\")\n\n# Incremental calculation (similar to binascii.crc32 with 'value' parameter)\ncrc_part1 = crc32c.crc32c(b\"hello\")\ncrc_total = crc32c.crc32c(b\" world\", value=crc_part1)\nprint(f\"Incremental CRC32C: {crc_total}\")\n\n# Using the hash-like object\nhash_obj = crc32c.CRC32CHash()\nhash_obj.update(b\"hello\")\nhash_obj.update(b\" world\")\nprint(f\"CRC32CHash object checksum: {hash_obj.checksum}\")\n\n# Check if hardware acceleration is in use\nprint(f\"Hardware acceleration in use: {crc32c.hardware_based}\")","lang":"python","description":"Demonstrates basic CRC32C calculation, incremental updates, usage of the `CRC32CHash` object, and how to check for hardware acceleration.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}