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

Improve the implementation of the PDFDocument.fingerprints-getter #17862

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Snuffleupagus
Copy link
Collaborator

  • Add explicit length validation of the /ID entries. Given the EMPTY_FINGERPRINT constant we're already implicitly assuming a particular length.

  • Move the constants into the fingerprints-getter, since they're not used anywhere else.

  • Replace the hexString helper function with the standard Uint8Array.prototype.toHex method; see https://github.com/tc39/proposal-arraybuffer-base64

src/core/document.js Outdated Show resolved Hide resolved
 - Add explicit `length` validation of the /ID entries. Given the `EMPTY_FINGERPRINT` constant we're already *implicitly* assuming a particular length.

 - Move the constants into the `fingerprints`-getter, since they're not used anywhere else.

 - Replace the `hexString` helper function with the standard `Uint8Array.prototype.toHex` method; see https://github.com/tc39/proposal-arraybuffer-base64
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.

None yet

2 participants