mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-02 09:56:57 +00:00
feat: make used bcrypt rounds configurable
This allows to configure the used bcrypt rounds and set it to 4 in tests, greatly speeding up the tests. It's not really required to set this to another value but it might be in the future as computers get faster.
This commit is contained in:
@@ -119,7 +119,7 @@ func CreateUser(s *xorm.Session, user *User) (newUser *User, err error) {
|
||||
|
||||
// HashPassword hashes a password
|
||||
func HashPassword(password string) (string, error) {
|
||||
bytes, err := bcrypt.GenerateFromPassword([]byte(password), 11)
|
||||
bytes, err := bcrypt.GenerateFromPassword([]byte(password), config.ServiceBcryptRounds.GetInt())
|
||||
return string(bytes), err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user