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;
/**
@@ -54,12 +55,7 @@ class CryptSHA512 extends AbstractCrypt
*/
public function configuration()
{
return [
[
"name" => "rounds", "visible_name" => "Rounds", "default" => 5000,
"min" => 1000, "max" => 999999999
]
];
return [new CryptoParam("Rounds", 5000, 1000, 999999999)];
}
/**