| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/vendor/mpdf/mpdf/src/Pdf/Protection/ |
Upload File : |
<?php
namespace Mpdf\Pdf\Protection;
class UniqidGenerator
{
public function __construct()
{
if (!function_exists('random_int') || !function_exists('random_bytes')) {
throw new \Mpdf\MpdfException(
'Unable to set PDF file protection, CSPRNG Functions are not available. '
. 'Use paragonie/random_compat polyfill or upgrade to PHP 7.'
);
}
}
/**
* @return string
*/
public function generate()
{
$chars = 'ABCDEF1234567890';
$id = '';
for ($i = 0; $i < 32; $i++) {
$id .= $chars[random_int(0, 15)];
}
return md5($id);
}
}