Skip to content

added optional appended salt for checksum calculation#56

Open
JoeChester wants to merge 1 commit into
nicoulaj:masterfrom
JoeChester:master
Open

added optional appended salt for checksum calculation#56
JoeChester wants to merge 1 commit into
nicoulaj:masterfrom
JoeChester:master

Conversation

@JoeChester

@JoeChester JoeChester commented May 15, 2018

Copy link
Copy Markdown

see below...

@nicoulaj nicoulaj left a comment

Copy link
Copy Markdown
Owner

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
Copy Markdown
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