summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/auth/oauth2.go2
-rw-r--r--models/auth/twofactor.go2
-rw-r--r--models/migrations/base/hash.go2
-rw-r--r--models/migrations/v1_14/v166.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/models/auth/oauth2.go b/models/auth/oauth2.go
index 09d4bfc4ea..bda0668c45 100644
--- a/models/auth/oauth2.go
+++ b/models/auth/oauth2.go
@@ -5,7 +5,6 @@ package auth
import (
"context"
- "crypto/sha256"
"encoding/base32"
"encoding/base64"
"fmt"
@@ -18,6 +17,7 @@ import (
"code.gitea.io/gitea/modules/util"
uuid "github.com/google/uuid"
+ "github.com/minio/sha256-simd"
"golang.org/x/crypto/bcrypt"
"xorm.io/builder"
"xorm.io/xorm"
diff --git a/models/auth/twofactor.go b/models/auth/twofactor.go
index 5b3a9d011a..751a281f7e 100644
--- a/models/auth/twofactor.go
+++ b/models/auth/twofactor.go
@@ -5,7 +5,6 @@ package auth
import (
"crypto/md5"
- "crypto/sha256"
"crypto/subtle"
"encoding/base32"
"encoding/base64"
@@ -18,6 +17,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
+ "github.com/minio/sha256-simd"
"github.com/pquerna/otp/totp"
"golang.org/x/crypto/pbkdf2"
)
diff --git a/models/migrations/base/hash.go b/models/migrations/base/hash.go
index 00fd1efd4a..0debec272b 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 f797930d6d..de7626076a 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"