media-cloud-sync
/
includes
/
sdk
/
google
/
ramsey
/
uuid
/
src
/
Generator
/
DceSecurityGeneratorInterface.php
DceSecurityGeneratorInterface.php in Media Cloud Sync 1.0.1, at includes/sdk/google/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php
| 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 | declare (strict_types=1); |
| 13 | namespace Dudlewebs\WPMCS\Ramsey\Uuid\Generator; |
| 14 | |
| 15 | use Dudlewebs\WPMCS\Ramsey\Uuid\Rfc4122\UuidV2; |
| 16 | use Dudlewebs\WPMCS\Ramsey\Uuid\Type\Hexadecimal; |
| 17 | use Dudlewebs\WPMCS\Ramsey\Uuid\Type\Integer as IntegerObject; |
| 18 | /** |
| 19 | * A DCE Security generator generates strings of binary data based on a local |
| 20 | * domain, local identifier, node ID, clock sequence, and the current time |
| 21 | * |
| 22 | * @see UuidV2 |
| 23 | */ |
| 24 | interface DceSecurityGeneratorInterface |
| 25 | { |
| 26 | /** |
| 27 | * Generate a binary string from a local domain, local identifier, node ID, |
| 28 | * clock sequence, and current time |
| 29 | * |
| 30 | * @param int $localDomain The local domain to use when generating bytes, |
| 31 | * according to DCE Security |
| 32 | * @param IntegerObject|null $localIdentifier The local identifier for the |
| 33 | * given domain; this may be a UID or GID on POSIX systems, if the local |
| 34 | * domain is person or group, or it may be a site-defined identifier |
| 35 | * if the local domain is org |
| 36 | * @param Hexadecimal|null $node A 48-bit number representing the hardware |
| 37 | * address |
| 38 | * @param int|null $clockSeq A 14-bit number used to help avoid duplicates |
| 39 | * that could arise when the clock is set backwards in time or if the |
| 40 | * node ID changes |
| 41 | * |
| 42 | * @return string A binary string |
| 43 | */ |
| 44 | public function generate(int $localDomain, ?IntegerObject $localIdentifier = null, ?Hexadecimal $node = null, ?int $clockSeq = null): string; |
| 45 | } |
| 46 |