Skip to content

use SecurityHandler.encryptDataRC4(byte[], byte[], OutputStream) method - #505

Closed
valerybokov wants to merge 1 commit into
apache:trunkfrom
valerybokov:refactor-StandardSecurityHandler
Closed

use SecurityHandler.encryptDataRC4(byte[], byte[], OutputStream) method#505
valerybokov wants to merge 1 commit into
apache:trunkfrom
valerybokov:refactor-StandardSecurityHandler

Conversation

@valerybokov

Copy link
Copy Markdown

We can call another encryptDataRC4 method to avoid allocating memory for ByteArrayInputStream.

…od instead of encryptDataRC4(byte[], InputStream, OutputStream)
@THausherr

THausherr commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Thank you, nice find. This will allow me to deprecate / remove that other method.
https://issues.apache.org/jira/browse/PDFBOX-6247

@valerybokov

Copy link
Copy Markdown
Author

Thank you, nice find. This will allow me to deprecate / remove that other method.

Okay. There is no reason to use it.
As far as I understand, encryption class methods typically use streams rather than arrays. However, this is more my observation than definitive knowledge.

@THausherr

Copy link
Copy Markdown
Contributor

Sadly it was too good to be true. Some weird error in my own thought.

@valerybokov

Copy link
Copy Markdown
Author

Sadly it was too good to be true. Some weird error in my own thought.

Do you mean it still used some were? Yeah. Maybe you will do it later with changed code.

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