protected function getPasswordEncoder($userData = null)
    {
        if (isset($userData['encoder']) && is_string($userData['encoder'])) {
            $name = $userData['encoder'];
        } else {
            $name = $this->config["encoder"];
        }

        $container = $this->picoAuth->getContainer();
        
        if (!$container->has($name)) {
            throw new \RuntimeException("Specified LocalAuth encoder is not resolvable.");
        }

        return $container->get($name);
    }