. */ namespace SP\Domain\Crypt\Ports; use Exception; use SP\Domain\Core\Exceptions\ConstraintException; use SP\Domain\Core\Exceptions\QueryException; use SP\Domain\Crypt\Dtos\UpdateMasterPassRequest; /** * Class MasterPassService * * @package SP\Domain\Crypt\Services */ interface MasterPassService { /** * Check whether the user's master password was updated * * @param int $userMPassTime * @return bool false if it needs to be updated, false otherwise */ public function checkUserUpdateMPass(int $userMPassTime): bool; /** * Check whether the provided master paswword matches with the current one */ public function checkMasterPassword(string $masterPassword): bool; /** * @throws Exception */ public function changeMasterPassword(UpdateMasterPassRequest $request): void; /** * @throws ConstraintException * @throws QueryException */ public function updateConfig($hash): void; }