diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2024-02-25 14:32:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 13:32:13 +0000 |
commit | f79c9e817abaef279c0b33d5460a066170dd3ea6 (patch) | |
tree | bc0ca11ec487aab8458fe78e89a6d21d50baa53b /tests | |
parent | ad0a34b492c3d41952ff4648c8bfb7b54c376151 (diff) | |
download | gitea-f79c9e817abaef279c0b33d5460a066170dd3ea6.tar.gz gitea-f79c9e817abaef279c0b33d5460a066170dd3ea6.zip |
Use `crypto/sha256` (#29386)
Go 1.21 improved the performance of `crypto/sha256`. It's now similar to
`minio/sha256-simd`, so we should just use the standard libs.
https://go.dev/doc/go1.21#crypto/sha256
https://go-review.googlesource.com/c/go/+/408795
https://github.com/multiformats/go-multihash/pull/173
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/api_packages_chef_test.go | 2 | ||||
-rw-r--r-- | tests/integration/api_packages_container_test.go | 2 | ||||
-rw-r--r-- | tests/integration/api_packages_test.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/api_packages_chef_test.go b/tests/integration/api_packages_chef_test.go index 4123c7216c..05545f11a6 100644 --- a/tests/integration/api_packages_chef_test.go +++ b/tests/integration/api_packages_chef_test.go @@ -11,6 +11,7 @@ import ( "crypto/rand" "crypto/rsa" "crypto/sha1" + "crypto/sha256" "crypto/x509" "encoding/base64" "encoding/pem" @@ -33,7 +34,6 @@ import ( chef_router "code.gitea.io/gitea/routers/api/packages/chef" "code.gitea.io/gitea/tests" - "github.com/minio/sha256-simd" "github.com/stretchr/testify/assert" ) diff --git a/tests/integration/api_packages_container_test.go b/tests/integration/api_packages_container_test.go index 509ad424e6..9ac6e5256b 100644 --- a/tests/integration/api_packages_container_test.go +++ b/tests/integration/api_packages_container_test.go @@ -5,6 +5,7 @@ package integration import ( "bytes" + "crypto/sha256" "encoding/base64" "fmt" "net/http" @@ -24,7 +25,6 @@ import ( "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/tests" - "github.com/minio/sha256-simd" oci "github.com/opencontainers/image-spec/specs-go/v1" "github.com/stretchr/testify/assert" ) diff --git a/tests/integration/api_packages_test.go b/tests/integration/api_packages_test.go index 8c981566b6..daf32e82f9 100644 --- a/tests/integration/api_packages_test.go +++ b/tests/integration/api_packages_test.go @@ -5,6 +5,7 @@ package integration import ( "bytes" + "crypto/sha256" "fmt" "net/http" "strings" @@ -24,7 +25,6 @@ import ( packages_cleanup_service "code.gitea.io/gitea/services/packages/cleanup" "code.gitea.io/gitea/tests" - "github.com/minio/sha256-simd" "github.com/stretchr/testify/assert" ) |