Dedicated class for crypto parameters

This commit is contained in:
Marcin Łojewski
2018-12-24 15:28:05 +01:00
parent 5045c7d931
commit 93e769bfe5
8 changed files with 83 additions and 44 deletions

View File

@@ -21,6 +21,7 @@
namespace OCA\UserSQL\Crypto;
use OCA\UserSQL\Model\CryptoParam;
use OCP\IL10N;
/**
@@ -72,12 +73,7 @@ class CryptBlowfish extends AbstractAlgorithm
*/
public function configuration()
{
return [
[
"name" => "cost", "visible_name" => "Cost", "default" => 10,
"min" => 4, "max" => 31
]
];
return [new CryptoParam("Cost", 10, 4, 31)];
}
/**