mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge pull request #3947 from appwrite/fix-scrypt-params
Fix scrypt params
This commit is contained in:
commit
7880adda3f
2 changed files with 9 additions and 9 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue