mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Use base32 for 2FA scratch token (#18384)
* Use base32 for 2FA scratch token * rename Secure* to Crypto*, add comments
This commit is contained in:
@@ -24,7 +24,7 @@ func New() (string, error) {
|
||||
|
||||
// NewWithLength creates a new secret for a given length
|
||||
func NewWithLength(length int64) (string, error) {
|
||||
return util.RandomString(length)
|
||||
return util.CryptoRandomString(length)
|
||||
}
|
||||
|
||||
// AesEncrypt encrypts text and given key with AES.
|
||||
|
Reference in New Issue
Block a user