mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-15 13:42:26 +03:00
Make bcrypt cost configurable (#1793)
This commit is contained in:
parent
c3ad2cca49
commit
850abb1dde
11 changed files with 39 additions and 18 deletions
|
@ -25,10 +25,11 @@ import (
|
|||
func NewDatabase(
|
||||
dbProperties *config.DatabaseOptions,
|
||||
serverName gomatrixserverlib.ServerName,
|
||||
bcryptCost int,
|
||||
) (Database, error) {
|
||||
switch {
|
||||
case dbProperties.ConnectionString.IsSQLite():
|
||||
return sqlite3.NewDatabase(dbProperties, serverName)
|
||||
return sqlite3.NewDatabase(dbProperties, serverName, bcryptCost)
|
||||
case dbProperties.ConnectionString.IsPostgres():
|
||||
return nil, fmt.Errorf("can't use Postgres implementation")
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue