mirror of
https://github.com/go-gitea/gitea
synced 2025-09-28 03:28:13 +00:00
Some improvements
This commit is contained in:
@@ -70,11 +70,5 @@ func NewSecretKey() (string, error) {
|
||||
|
||||
// NewMasterKey generate a new value intended to be used by MASTER_KEY.
|
||||
func NewMasterKey() ([]byte, error) {
|
||||
secretBytes := make([]byte, 32)
|
||||
_, err := io.ReadFull(rand.Reader, secretBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return secretBytes, nil
|
||||
return util.CryptoRandomBytes(32)
|
||||
}
|
||||
|
Reference in New Issue
Block a user