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

Comments

@nerdralph
Copy link

@nerdralph nerdralph commented Apr 22, 2021

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
@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants