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 the ballot encoding #102

Merged
merged 2 commits into from
Apr 28, 2022
Merged

Fix the ballot encoding #102

merged 2 commits into from
Apr 28, 2022

Conversation

cmsigrist
Copy link
Contributor

Fix the way the encoded ballot is divided into chunks of 29 bytes (counting the characters resulted in a bug where some chunks
where longer than 29 bytes because of special characters).
A workaround is to first encode into bytes the ballot, divide the resulting array of bytes into chunks of 29 bytes and then decode each chunks back into a string (of 29 bytes) ...

@coveralls
Copy link

coveralls commented Apr 27, 2022

Pull Request Test Coverage Report for Build 2234775233

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 64.132%

Totals Coverage Status
Change from base Build 2232452930: 0.0%
Covered Lines: 3079
Relevant Lines: 4801

💛 - Coveralls

We don't need to string-encode the chunks and the do the opposite when encrypting. We can just keep the chunks as `Uint8Array[]`
@nkcr
Copy link
Contributor

nkcr commented Apr 28, 2022

Made an update, we can keep the chunks as Uint8Array[] all the way until encryption.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@cmsigrist
Copy link
Contributor Author

Made an update, we can keep the chunks as Uint8Array[] all the way until encryption.

Excellent (I wasn't sure if it would work with bytes hence the decoding back into strings) !

@cmsigrist cmsigrist merged commit ce458bc into main Apr 28, 2022
@cmsigrist cmsigrist deleted the frontend-fix-ballot branch April 28, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants