From: Sergey Matveev <stargrave@stargrave.org>
Date: Wed, 12 Feb 2025 10:32:51 +0000 (+0300)
Subject: Use Go 1.24's crypto/sha3
X-Git-Tag: v1.1.0
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=7999b061a9f3c9f3627e7501d8af3cb28be48ab0;p=gosha3.git

Use Go 1.24's crypto/sha3
---

diff --git a/cmd/goshake128/main.go b/cmd/goshake128/main.go
index 1511f12..e3d4b78 100644
--- a/cmd/goshake128/main.go
+++ b/cmd/goshake128/main.go
@@ -7,11 +7,11 @@ import (
 	"io"
 	"os"
 
-	"golang.org/x/crypto/sha3"
+	"crypto/sha3"
 )
 
 func main() {
-	h := sha3.NewShake128()
+	h := sha3.NewSHAKE128()
 	dgst := make([]byte, 32)
 	var err error
 	if _, err = io.Copy(h, bufio.NewReaderSize(os.Stdin, 1<<20)); err != nil {
diff --git a/cmd/goshake256/main.go b/cmd/goshake256/main.go
index 6895fa5..c637da4 100644
--- a/cmd/goshake256/main.go
+++ b/cmd/goshake256/main.go
@@ -7,11 +7,11 @@ import (
 	"io"
 	"os"
 
-	"golang.org/x/crypto/sha3"
+	"crypto/sha3"
 )
 
 func main() {
-	h := sha3.NewShake256()
+	h := sha3.NewSHAKE256()
 	dgst := make([]byte, 64)
 	var err error
 	if _, err = io.Copy(h, bufio.NewReaderSize(os.Stdin, 1<<20)); err != nil {
diff --git a/go.mod b/go.mod
index ecfb048..05ae2d1 100644
--- a/go.mod
+++ b/go.mod
@@ -1,7 +1,3 @@
 module go.stargrave.org/gosha3
 
-go 1.20
-
-require golang.org/x/crypto v0.8.0
-
-require golang.org/x/sys v0.7.0 // indirect
+go 1.24
diff --git a/go.sum b/go.sum
index 81d231e..e69de29 100644
--- a/go.sum
+++ b/go.sum
@@ -1,4 +0,0 @@
-golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
-golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
-golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
-golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=