This commit is contained in:
Lunny Xiao authored and Jason Song committed 2022-11-25 17:48:46 +08:00
1 parent 8ec691f3ce
commit e7d5c99b42
8 files changed
+56 -43

No files matched your search

-10
View File
@@ -9,7 +9,6 @@ import (
"crypto/rand"
"encoding/base64"
"io"
"math/big"
"time"
"code.gitea.io/gitea/modules/util"
@@ -79,12 +78,3 @@ func NewMasterKey() ([]byte, error) {
return secretBytes, nil
}
func randomInt(max *big.Int) (int, error) {
rand, err := rand.Int(rand.Reader, max)
if err != nil {
return 0, err
}
return int(rand.Int64()), nil
}