Skip to content

feat: add Fletcher checksum to hashing#1034

Open
AliAlimohammadi wants to merge 1 commit intoTheAlgorithms:masterfrom
AliAlimohammadi:add-fletcher16-hashing
Open

feat: add Fletcher checksum to hashing#1034
AliAlimohammadi wants to merge 1 commit intoTheAlgorithms:masterfrom
AliAlimohammadi:add-fletcher16-hashing

Conversation

@AliAlimohammadi
Copy link
Copy Markdown
Contributor

@AliAlimohammadi AliAlimohammadi commented Apr 8, 2026

Description

Adds an implementation of the Fletcher-16 checksum algorithm to src/hashing/.

Fletcher's checksum is a position-dependent checksum devised by John G. Fletcher (1934–2012) at Lawrence Livermore Labs in the late 1970s. It provides error-detection properties approaching those of a CRC but with lower computational effort, by maintaining two running sums (sum1, sum2) each reduced modulo 255, then packing them into a single 16-bit value.

Reference: Fletcher's Checksum — Wikipedia

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked CONTRIBUTING.md and my code follows its guidelines.

@AliAlimohammadi AliAlimohammadi requested a review from imp2002 as a code owner April 8, 2026 19:54
@AliAlimohammadi
Copy link
Copy Markdown
Contributor Author

@siriak, this is ready to be merged.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.00%. Comparing base (6e42c38) to head (022068a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1034   +/-   ##
=======================================
  Coverage   95.99%   96.00%           
=======================================
  Files         390      391    +1     
  Lines       29605    29630   +25     
=======================================
+ Hits        28420    28445   +25     
  Misses       1185     1185           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants