Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename encode/decode + handle padding chars #11

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

saleel
Copy link
Contributor

@saleel saleel commented Oct 2, 2024

Problem

  • encode() was doing decoding and decode was doing encoding
  • during encode, padding chars were incorrectly encoded as 65 (A) instead of = (as both are 0)

Summary

  • Renamed encode/decode
  • Handle padding chars during encoding
  • Add more tests
  • Add assertions in input/output size

Apologies for adding too much in one PR

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@saleel saleel changed the title feat!: rename encode/decode + handle padding chars fix: rename encode/decode + handle padding chars Oct 3, 2024
@saleel
Copy link
Contributor Author

saleel commented Oct 3, 2024

Note: Usage docs in README.md needs to be updated to align with the changes in this PR once approved/merged.

src/lib.nr Outdated Show resolved Hide resolved
@saleel saleel requested a review from TomAFrench October 4, 2024 11:31
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