OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
ramsey
/
uuid
/
src
/
Generator
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:34:36 AM
rwxr-xr-x
📄
CombGenerator.php
3.23 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
DceSecurityGenerator.php
4.48 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
DceSecurityGeneratorInterface.php
1.76 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
DefaultNameGenerator.php
1.28 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
DefaultTimeGenerator.php
3.93 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
NameGeneratorFactory.php
728 bytes
08/12/2024 10:34:35 AM
rw-r--r--
📄
NameGeneratorInterface.php
1.08 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
PeclUuidNameGenerator.php
1.37 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
PeclUuidRandomGenerator.php
842 bytes
08/12/2024 10:34:35 AM
rw-r--r--
📄
PeclUuidTimeGenerator.php
912 bytes
08/12/2024 10:34:35 AM
rw-r--r--
📄
RandomBytesGenerator.php
1.16 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
RandomGeneratorFactory.php
738 bytes
08/12/2024 10:34:35 AM
rw-r--r--
📄
RandomGeneratorInterface.php
765 bytes
08/12/2024 10:34:35 AM
rw-r--r--
📄
RandomLibAdapter.php
1.58 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
TimeGeneratorFactory.php
1.18 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
TimeGeneratorInterface.php
1.17 KB
08/12/2024 10:34:35 AM
rw-r--r--
📄
UnixTimeGenerator.php
6 KB
08/12/2024 10:34:35 AM
rw-r--r--
Editing: DefaultNameGenerator.php
Close
<?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Generator; use Ramsey\Uuid\Exception\NameException; use Ramsey\Uuid\UuidInterface; use ValueError; use function hash; /** * DefaultNameGenerator generates strings of binary data based on a namespace, * name, and hashing algorithm */ class DefaultNameGenerator implements NameGeneratorInterface { /** @psalm-pure */ public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string { try { /** @var string|bool $bytes */ $bytes = @hash($hashAlgorithm, $ns->getBytes() . $name, true); } catch (ValueError $e) { $bytes = false; // keep same behavior than PHP 7 } if ($bytes === false) { throw new NameException(sprintf( 'Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm )); } return (string) $bytes; } }