2022-06-15 08:11:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Appwrite\Utopia\Response\Model;
|
|
|
|
|
|
|
|
|
|
use Appwrite\Utopia\Response;
|
|
|
|
|
use Appwrite\Utopia\Response\Model;
|
|
|
|
|
|
|
|
|
|
class AlgoScryptModified extends Model
|
|
|
|
|
{
|
2026-04-16 07:32:57 +00:00
|
|
|
public array $conditions = [
|
|
|
|
|
'type' => 'scryptMod',
|
|
|
|
|
];
|
|
|
|
|
|
2022-06-15 08:11:48 +00:00
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this
|
2022-10-10 23:27:03 +00:00
|
|
|
->addRule('type', [
|
|
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Algo type.',
|
|
|
|
|
'default' => 'scryptMod',
|
|
|
|
|
'example' => 'scryptMod',
|
|
|
|
|
])
|
2022-06-15 08:11:48 +00:00
|
|
|
->addRule('salt', [
|
|
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Salt used to compute hash.',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'UxLMreBr6tYyjQ==',
|
|
|
|
|
])
|
2022-06-16 09:21:35 +00:00
|
|
|
->addRule('saltSeparator', [
|
2022-06-15 08:11:48 +00:00
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Separator used to compute hash.',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'Bw==',
|
|
|
|
|
])
|
2022-06-16 09:21:35 +00:00
|
|
|
->addRule('signerKey', [
|
2022-06-15 08:11:48 +00:00
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Key used to compute hash.',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'XyEKE9RcTDeLEsL/RjwPDBv/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==',
|
|
|
|
|
])
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Name
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getName(): string
|
|
|
|
|
{
|
2022-06-17 09:25:28 +00:00
|
|
|
return 'AlgoScryptModified';
|
2022-06-15 08:11:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Type
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getType(): string
|
|
|
|
|
{
|
|
|
|
|
return Response::MODEL_ALGO_SCRYPT_MODIFIED;
|
|
|
|
|
}
|
|
|
|
|
}
|