summaryrefslogtreecommitdiffstats
path: root/modules/lfs
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2024-02-25 14:32:13 +0100
committerGitHub <noreply@github.com>2024-02-25 13:32:13 +0000
commitf79c9e817abaef279c0b33d5460a066170dd3ea6 (patch)
treebc0ca11ec487aab8458fe78e89a6d21d50baa53b /modules/lfs
parentad0a34b492c3d41952ff4648c8bfb7b54c376151 (diff)
downloadgitea-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 'modules/lfs')
-rw-r--r--modules/lfs/content_store.go3
-rw-r--r--modules/lfs/pointer.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/modules/lfs/content_store.go b/modules/lfs/content_store.go
index daf8c6cfdd..0d9c0c98ac 100644
--- a/modules/lfs/content_store.go
+++ b/modules/lfs/content_store.go
@@ -4,6 +4,7 @@
package lfs
import (
+ "crypto/sha256"
"encoding/hex"
"errors"
"hash"
@@ -12,8 +13,6 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/storage"
-
- "github.com/minio/sha256-simd"
)
var (
diff --git a/modules/lfs/pointer.go b/modules/lfs/pointer.go
index 3e5bb8f91d..ebde20f826 100644
--- a/modules/lfs/pointer.go
+++ b/modules/lfs/pointer.go
@@ -4,6 +4,7 @@
package lfs
import (
+ "crypto/sha256"
"encoding/hex"
"errors"
"fmt"
@@ -12,8 +13,6 @@ import (
"regexp"
"strconv"
"strings"
-
- "github.com/minio/sha256-simd"
)
const (