Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/**
4
 * This file is part of the ramsey/uuid library
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com>
10
 * @license http://opensource.org/licenses/MIT MIT
11
 */
12
 
13
declare(strict_types=1);
14
 
15
namespace Ramsey\Uuid\Generator;
16
 
17
use Ramsey\Uuid\UuidInterface;
18
 
19
/**
20
 * A name generator generates strings of binary data created by hashing together
21
 * a namespace with a name, according to a hashing algorithm
22
 */
23
interface NameGeneratorInterface
24
{
25
    /**
26
     * Generate a binary string from a namespace and name hashed together with
27
     * the specified hashing algorithm
28
     *
29
     * @param UuidInterface $ns The namespace
30
     * @param string $name The name to use for creating a UUID
31
     * @param string $hashAlgorithm The hashing algorithm to use
32
     *
33
     * @return string A binary string
34
     *
35
     * @psalm-pure
36
     */
37
    public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string;
38
}