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 /models/migrations | |
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 'models/migrations')
-rw-r--r-- | models/migrations/base/hash.go | 2 | ||||
-rw-r--r-- | models/migrations/v1_14/v166.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/models/migrations/base/hash.go b/models/migrations/base/hash.go index 0debec272b..00fd1efd4a 100644 --- a/models/migrations/base/hash.go +++ b/models/migrations/base/hash.go @@ -4,9 +4,9 @@ package base import ( + "crypto/sha256" "encoding/hex" - "github.com/minio/sha256-simd" "golang.org/x/crypto/pbkdf2" ) diff --git a/models/migrations/v1_14/v166.go b/models/migrations/v1_14/v166.go index 78f33e8f9b..e5731582fd 100644 --- a/models/migrations/v1_14/v166.go +++ b/models/migrations/v1_14/v166.go @@ -4,9 +4,9 @@ package v1_14 //nolint import ( + "crypto/sha256" "encoding/hex" - "github.com/minio/sha256-simd" "golang.org/x/crypto/argon2" "golang.org/x/crypto/bcrypt" "golang.org/x/crypto/pbkdf2" |