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

x/crypto/sha3: superfluous rate in state struct #45705

Open
nerdralph opened this issue Apr 22, 2021 · 0 comments
Open

x/crypto/sha3: superfluous rate in state struct #45705

nerdralph opened this issue Apr 22, 2021 · 0 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@nerdralph
Copy link

https://github.com/golang/crypto/blob/master/sha3/sha3.go#L27

Rate is always 200 - (outputLen * 2), and therefore is superfluous. I think the code would be cleaner if rate is derived from outputLen. The rate member is not exposed in the public API, and therefore can be removed.

@gopherbot gopherbot added this to the Unreleased milestone Apr 22, 2021
@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 22, 2021
@FiloSottile FiloSottile changed the title x/crypto: superfluous rate in state struct x/cryptosha3: superfluous rate in state struct Apr 23, 2021
@FiloSottile FiloSottile changed the title x/cryptosha3: superfluous rate in state struct x/crypto/sha3: superfluous rate in state struct Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants