diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d2b303c6a1..407bc1eaab 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -290,10 +290,10 @@ App::post('/v1/users/scrypt') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using Scrypt.') ->param('passwordSalt', '', new Text(128), 'Optional salt used to hash password.') - ->param('passwordCpu', '', new Integer(), 'Optional CPU cost used to hash password.') - ->param('passwordMemory', '', new Integer(), 'Optional memory cost used to hash password.') - ->param('passwordParallel', '', new Integer(), 'Optional parallelization cost used to hash password.') - ->param('passwordLength', '', new Integer(), 'Optional hash length used to hash password.') + ->param('passwordCpu', 8, new Integer(), 'Optional CPU cost used to hash password.') + ->param('passwordMemory', 14, new Integer(), 'Optional memory cost used to hash password.') + ->param('passwordParallel', 1, new Integer(), 'Optional parallelization cost used to hash password.') + ->param('passwordLength', 64, new Integer(), 'Optional hash length used to hash password.') ->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Utopia/Response/Model/AlgoScrypt.php b/src/Appwrite/Utopia/Response/Model/AlgoScrypt.php index 606bcb50a7..ca3ab3dd70 100644 --- a/src/Appwrite/Utopia/Response/Model/AlgoScrypt.php +++ b/src/Appwrite/Utopia/Response/Model/AlgoScrypt.php @@ -13,26 +13,26 @@ class AlgoScrypt extends Model ->addRule('costCpu', [ 'type' => self::TYPE_INTEGER, 'description' => 'CPU complexity of computed hash.', - 'default' => '', + 'default' => 8, 'example' => 8, ]) ->addRule('costMemory', [ 'type' => self::TYPE_INTEGER, 'description' => 'Memory complexity of computed hash.', - 'default' => '', + 'default' => 14, 'example' => 14, ]) ->addRule('costParallel', [ 'type' => self::TYPE_INTEGER, 'description' => 'Parallelization of computed hash.', - 'default' => '', + 'default' => 1, 'example' => 1, ]) ->addRule('length', [ 'type' => self::TYPE_INTEGER, 'description' => 'Length used to compute hash.', - 'default' => '', - 'example' => 1, + 'default' => 64, + 'example' => 64, ]) ; }