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

added optional appended salt for checksum calculation #56

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

Conversation

JoeChester
Copy link

@JoeChester JoeChester commented May 15, 2018

see below...

Copy link
Owner

@nicoulaj nicoulaj left a comment

Choose a reason for hiding this comment

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

Thanks! see my comment on CRC32

{
throw new DigesterException( "Unable to read " + file.getPath() + ": " + e.getMessage() );
try {
byte[] bytes = IOUtils.toByteArray(new FileInputStream(file));
Copy link
Owner

Choose a reason for hiding this comment

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

This will load the whole file in memory, also there are several unneeded array copies, I think this can be done without much overhead but just chaining the file input stream with a salt ByteArrayInputStream

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.

2 participants