Skip to content

Switch from x/crypto to stdlib sha3 hash#4461

Merged
pkwarren merged 1 commit intomainfrom
pkw/crypto-sha3
Apr 13, 2026
Merged

Switch from x/crypto to stdlib sha3 hash#4461
pkwarren merged 1 commit intomainfrom
pkw/crypto-sha3

Conversation

@pkwarren
Copy link
Copy Markdown
Member

Starting in Go 1.24, sha3 is now part of the stdlib. Switch to it instead of consuming via x/crypto.

Starting in Go 1.24, sha3 is now part of the stdlib. Switch to it
instead of consuming via x/crypto.
@github-actions
Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 13, 2026, 3:05 PM

shakeHash := sha3.NewShake256()
// TODO FUTURE: remove in the future, this should have no effect
shakeHash.Reset()
shakeHash := sha3.NewSHAKE256()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

func NewDigestForContent(reader io.Reader) (Digest, error) {
shakeHash := sha3.NewShake256()
// TODO FUTURE: remove in the future, this should have no effect
shakeHash.Reset()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Wasn't sure why this was there since we were creating it just before.

@pkwarren pkwarren merged commit 4696ee0 into main Apr 13, 2026
12 checks passed
@pkwarren pkwarren deleted the pkw/crypto-sha3 branch April 13, 2026 15:50
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.

3 participants