public function renderBase64Img($message, $extension = null, $size = null, $padding = null, $attribs = array())
    {
        if (isset($extension)) {
            if (is_array($extension)) {
                $attribs = $extension;
                $extension = null;
            } elseif (isset($size)) {
                if (is_array($size)) {
                    $attribs = $size;
                    $size = null;
                } elseif (isset($padding) && is_array($padding)) {
                    $attribs = $padding;
                    $padding = null;
                }
            }
        }

        $image          = $this->qrCodeService->getQrCodeContent($message, $extension, $size, $padding);
        $contentType    = $this->qrCodeService->generateContentType(
            isset($extension) ? $extension : QrCodeServiceInterface::DEFAULT_EXTENSION
        );

        return $this->renderer->render(self::IMG_BASE64_TEMPLATE, array(
            'base64'        => base64_encode($image),
            'contentType'   => $contentType,
            'attribs'       => $attribs
        ));
    }