Add Base91 encoding/decoding operations #2120
Open
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.
Overview
This PR adds complete Base91 encoding/decoding operations to CyberChef, providing users with an additional binary-to-text encoding option that offers better space efficiency than Base64.
What is Base91?
Base91 is a binary-to-text encoding scheme that uses 91 printable ASCII characters, developed by Joachim Henke. It provides approximately 2.5% better space efficiency compared to Base64 while maintaining human readability and compatibility with text-based protocols.
Changes Made
New Files Added:
src/core/lib/Base91.mjs
- Core Base91 implementation library with encoding/decoding functionssrc/core/operations/ToBase91.mjs
- Base91 encoding operation for CyberChef interfacesrc/core/operations/FromBase91.mjs
- Base91 decoding operation for CyberChef interfacesrc/core/config/Categories.json
- Added Base91 operations to the 'Data format' categoryFeatures
Technical Details
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%&()*+,./:;<=>?@[]^_`{|}~"`Use Cases
Base91 is particularly useful for:
Testing
The implementation has been tested with:
Compatibility
Author
Izai Alejandro Zalles Merino
Email: [email protected]
GitHub: @ialejandrozalles
References
This addition enhances CyberChef's binary-to-text encoding capabilities and provides users with more efficient options for data encoding scenarios.