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

Simplify the way to compute the remainder modulo 3 in PDF20Hash function #15548

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

calixteman
Copy link
Contributor

I noticed the 256 % 3 (which is equal to 1) so I slightly simplify the code. The sum of the 16 Uint8 doesn't exceed 2^12, hence we can just take the sum modulo 3.

I noticed the 256 % 3 (which is equal to 1) so I slighty simplify the code.
The sum of the 16 Uint8 doesn't exceed 2^12, hence we can just take the
sum modulo 3.
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with passing tests; thank you!

@calixteman
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2022

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/4be2924866eca42/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2022

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/df49069c069074f/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2022

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/4be2924866eca42/output.txt

Total script time: 25.53 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 21
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/4be2924866eca42/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2022

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/df49069c069074f/output.txt

Total script time: 30.50 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 18

Image differences available at: http://54.193.163.58:8877/df49069c069074f/reftest-analyzer.html#web=eq.log

@calixteman calixteman merged commit b27753a into mozilla:master Oct 7, 2022
@calixteman calixteman deleted the simplify_remainder branch October 7, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants