Skip to content

Conversation

onethumb
Copy link
Contributor

@onethumb onethumb commented Sep 1, 2025

The Problem

This library doesn't support custom initial states when calculating CRC, making it difficult to support certain workloads.

The Solution

Add support for custom initial states, as well as retrieving current state, when computing CRC digests.

Changes

  • Add Digest::new_with_init_state() method
  • Add Digest::get_state() method
  • Add docs and test coverage
  • Ensure the C-compatible library has support as well

Planned version bump

  • Which: MINOR
  • Why: non-breaking new functionality

Enables retrieving the current state, and starting a new Digest with a
starting initial state.

This enables more hashing workloads, including across operations.
onethumb added a commit that referenced this pull request Sep 1, 2025
* [Improve state handling](#16)
* [Add support for building a static library](#17)
@onethumb onethumb merged commit ee5e2fb into awesomized:main Sep 1, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant