Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NameGeneratorInterface.php

function NameGeneratorInterface::generate

Generate a binary string from a namespace and name hashed together with the specified hashing algorithm

@psalm-pure

Parameters

UuidInterface $ns The namespace:

string $name The name to use for creating a UUID:

string $hashAlgorithm The hashing algorithm to use:

Return value

string A binary string

2 methods override NameGeneratorInterface::generate()
DefaultNameGenerator::generate in vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php
@psalm-pure
PeclUuidNameGenerator::generate in vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php
@psalm-pure

File

vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php, line 37

Class

NameGeneratorInterface
A name generator generates strings of binary data created by hashing together a namespace with a name, according to a hashing algorithm

Namespace

Ramsey\Uuid\Generator

Code

public function generate(UuidInterface $ns, string $name, string $hashAlgorithm) : string;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal