summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/crypto/sha3
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-07-08 07:33:11 +0000
committerLibravatar GitHub <noreply@github.com>2024-07-08 07:33:11 +0000
commita81455e81c02d5c69b723b52c775a247313c82a2 (patch)
tree942e036c28e3f21edf43b2f8c467eeacc8bf6795 /vendor/golang.org/x/crypto/sha3
parent[chore] upstep activity to v1.7.0-gts (#3074) (diff)
downloadgotosocial-a81455e81c02d5c69b723b52c775a247313c82a2.tar.xz
[chore]: Bump golang.org/x/crypto from 0.24.0 to 0.25.0 (#3080)
Diffstat (limited to 'vendor/golang.org/x/crypto/sha3')
-rw-r--r--vendor/golang.org/x/crypto/sha3/doc.go2
-rw-r--r--vendor/golang.org/x/crypto/sha3/hashes.go8
-rw-r--r--vendor/golang.org/x/crypto/sha3/register.go18
3 files changed, 9 insertions, 19 deletions
diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go
index decd8cf9b..7e0230907 100644
--- a/vendor/golang.org/x/crypto/sha3/doc.go
+++ b/vendor/golang.org/x/crypto/sha3/doc.go
@@ -59,4 +59,4 @@
// They produce output of the same length, with the same security strengths
// against all attacks. This means, in particular, that SHA3-256 only has
// 128-bit collision resistance, because its output length is 32 bytes.
-package sha3 // import "golang.org/x/crypto/sha3"
+package sha3
diff --git a/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/golang.org/x/crypto/sha3/hashes.go
index 5eae6cb92..c544b29e5 100644
--- a/vendor/golang.org/x/crypto/sha3/hashes.go
+++ b/vendor/golang.org/x/crypto/sha3/hashes.go
@@ -9,6 +9,7 @@ package sha3
// bytes.
import (
+ "crypto"
"hash"
)
@@ -40,6 +41,13 @@ func New512() hash.Hash {
return new512()
}
+func init() {
+ crypto.RegisterHash(crypto.SHA3_224, New224)
+ crypto.RegisterHash(crypto.SHA3_256, New256)
+ crypto.RegisterHash(crypto.SHA3_384, New384)
+ crypto.RegisterHash(crypto.SHA3_512, New512)
+}
+
func new224Generic() *state {
return &state{rate: 144, outputLen: 28, dsbyte: 0x06}
}
diff --git a/vendor/golang.org/x/crypto/sha3/register.go b/vendor/golang.org/x/crypto/sha3/register.go
deleted file mode 100644
index addfd5049..000000000
--- a/vendor/golang.org/x/crypto/sha3/register.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.4
-
-package sha3
-
-import (
- "crypto"
-)
-
-func init() {
- crypto.RegisterHash(crypto.SHA3_224, New224)
- crypto.RegisterHash(crypto.SHA3_256, New256)
- crypto.RegisterHash(crypto.SHA3_384, New384)
- crypto.RegisterHash(crypto.SHA3_512, New512)
-}