Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1430308
Secure.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Secure.php
View Options
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Symfony\Polyfill\Php82\Random\Engine
;
use
Random\RandomException
;
use
Symfony\Polyfill\Php82\NoDynamicProperties
;
/**
* @author Tim Düsterhus <tim@bastelstu.be>
* @author Anton Smirnov <sandfox@sandfox.me>
*
* @internal
*/
class
Secure
{
use
NoDynamicProperties
;
public
function
generate
():
string
{
try
{
return
random_bytes
(
\PHP_INT_SIZE
);
}
catch
(
\Exception
$e
)
{
throw
new
RandomException
(
$e
->
getMessage
(),
$e
->
getCode
(),
$e
->
getPrevious
());
}
}
public
function
__sleep
():
array
{
throw
new
\Exception
(
"Serialization of 'Random
\E
ngine
\S
ecure' is not allowed"
);
}
public
function
__wakeup
():
void
{
throw
new
\Exception
(
"Unserialization of 'Random
\E
ngine
\S
ecure' is not allowed"
);
}
public
function
__clone
()
{
throw
new
\Error
(
'Trying to clone an uncloneable object of class Random
\E
ngine
\S
ecure'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 18:37 (5 h, 47 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
38/e9/958874348a2d23ed62ffb045069a
Default Alt Text
Secure.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment