forked from Hopding/pdf-lib
-
Notifications
You must be signed in to change notification settings - Fork 3
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
PDF暗号化機能を追加 #3
Merged
Merged
PDF暗号化機能を追加 #3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
機能追加
PDFDocument#encrypt()
メソッド追加PDFDocument#updateId()
メソッド追加PDFDocument#isEncrypted
プロパティをメソッドに変更encrypt()
の実行に伴い状態が変化するようになったため全般
MODIFICATIONS.md
に分離1.17.1-mod.2023.3
に更新依存追加
内部実装拡張
src/core/security
に暗号化関連のモジュール群を追加PDFDocument#encrypt
実行時に、暗号化の準備としてPDFSecurity
インスタンスが生成・保持されるsrc/core/writers
のPDF生成処理にて、実際の暗号化処理を実行する挙動を挿入PDFDocument#encrypt
実行済みの状態でPDFDocument#save
を呼んだ場合に実行されるsrc/core/objects
/src/core/structures
の一部モジュールにてencryptWith
メソッドを実装writers
(上述) の処理にて、個々のオブジェクトを書込前に暗号化するために使用されるテスト追加
tests
ディレクトリー)mock.ts
)に差し替えてテスト実施apps
ディレクトリー)useObjectStreams
false/true 両パターン)