protected function _resolveStrategy($strategy)
    {
        $key = Security::salt();

        if (!$strategy) {
            $class = self::DEFAULT_STRATEGY;
            $strategy = new $class($key);
        }

        if (is_string($strategy) && class_exists($strategy)) {
            $strategy = new $strategy($key);
        }

        if (!($strategy instanceof StrategyInterface)) {
            throw new Exception('Invalid "strategy" configuration.');
        }

        return $strategy;
    }