Repository navigation
feat(cipher/railfence): add FuzzRailFence test, rune support, and edge case handling - #812
Open
rajpreetcodes wants to merge 1 commit into
Open
rajpreetcodes wants to merge 1 commit into
rajpreetcodes wants to merge 1 commit into
Conversation
…e case handling Addresses TheAlgorithms#480 - Add FuzzRailFence fuzz test with seed corpus and utf8 validity check - Support Unicode runes by operating on rune slices instead of raw byte indexes - Store characters directly in per-rail rune slices to avoid sentinel null byte issues and reduce memory allocations - Guard against non-positive rails and rails exceeding text length
Not up to standards ⛔
|
Author
|
All unit tests, Unicode rune test cases, Fuzz test (FuzzRailFence), and golangci-lint with revive are passing 100% cleanly. The Codacy check is waiting on the coverage upload workflow run approval for fork PRs. Ready for review when convenient. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Addresses #480
FuzzRailFencefuzz test with comprehensive seed corpus and utf8 validity check.[]rune) rather than indexing raw bytes.Encryptto append characters directly to per-rail slices, eliminating sentinel null-byte filtering (which previously dropped valid\x00runes) and reducing memory allocations fromO(rails * n)toO(n).TestEncryptandTestDecryptcovering Unicode runes ("café crème"), negative rails, zero rails, and empty strings.Checklist
Notes: Adds FuzzRailFence fuzz testing, Unicode rune support, and edge-case handling for the rail fence cipher.