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

Make encryption buffer size adjustable #99

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bemasc
Copy link

@bemasc bemasc commented Nov 24, 2020

This will allow saving memory in cases where we are willing to limit the
encryption chunk size.

This will allow saving memory in cases where we are willing to limit the
encryption chunk size.
@bemasc bemasc requested a review from fortuna November 24, 2020 18:16
}

// SetSaltGenerator sets the salt generator to be used. Must be called before the first write.
func (sw *Writer) SetSaltGenerator(saltGenerator SaltGenerator) {
sw.saltGenerator = saltGenerator
}

// SetMaxChunkSize sets the maximum number of bytes to encrypt as a chunk.
// Defaults to 2^16-1. Smaller values save memory but increase framing overhead.
Copy link

Choose a reason for hiding this comment

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

PErhaps mention that it's capped at 2^16-1 as specified in the standard.

@241447
Copy link

241447 commented May 15, 2021

[email protected]/16

@sbruens sbruens closed this Mar 5, 2024
@sbruens sbruens deleted the bemasc-encryption-buffer branch March 5, 2024 22:57
@fortuna fortuna restored the bemasc-encryption-buffer branch March 6, 2024 15:51
@fortuna
Copy link

fortuna commented Mar 6, 2024

Keeping for future reference

@fortuna fortuna reopened this Mar 6, 2024
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.

4 participants