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: PeclUuidNameGenerator.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 function sprintf; use function uuid_generate_md5; use function uuid_generate_sha1; use function uuid_parse; /** * PeclUuidNameGenerator generates strings of binary data from a namespace and a * name, using ext-uuid * * @link https://pecl.php.net/package/uuid ext-uuid */ class PeclUuidNameGenerator implements NameGeneratorInterface { /** @psalm-pure */ public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string { $uuid = match ($hashAlgorithm) { 'md5' => uuid_generate_md5($ns->toString(), $name), 'sha1' => uuid_generate_sha1($ns->toString(), $name), default => throw new NameException( sprintf( 'Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm ) ), }; return uuid_parse($uuid); } }