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

use faster sha256 and blake2b implementations #63

Merged
merged 1 commit into from
Dec 17, 2017
Merged

Conversation

Stebalien
Copy link
Member

fixes #61

@Stebalien Stebalien requested a review from a user December 17, 2017 20:05
@Stebalien Stebalien force-pushed the feat/fast-hash branch 2 times, most recently from 250e661 to db7fbde Compare December 17, 2017 20:07
sum.go Outdated
}
hasher.Write(data)
var out [blake2b384Size]byte
copy(out[:], hasher.Sum(nil)[:blake2b384Size])
Copy link

Choose a reason for hiding this comment

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

Why the reslice of the destination here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was worried that the hasher would over allocate. However, this turns out to not be the case so I'll correct it.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Awesome, LGTM 👍 (one comment about a reslice)

blake2b-simd and sha256-simd are Apache-2.0-licensed, which can be used with our mostly MIT-licensed codebases fine.

@ghost
Copy link

ghost commented Dec 17, 2017

blake2b-simd and sha256-simd are Apache-2.0-licensed, which can be used with our mostly MIT-licensed codebases fine.

Could you fill out the license field in the gxed packages though?

@Stebalien
Copy link
Member Author

Could you fill out the license field in the gxed packages though?

Done.

@Stebalien Stebalien merged commit 11a0a5f into master Dec 17, 2017
@ghost ghost deleted the feat/fast-hash branch December 17, 2017 23:43
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.

Faster sha256 and blake2b implementations
1 participant