Ramsey\Uuid\UuidFactory::uuidFromNsAndName PHP Method

uuidFromNsAndName() protected method

Returns a version 3 or 5 namespaced Uuid
protected uuidFromNsAndName ( string | UuidInterface $ns, string $name, integer $version, string $hashFunction ) : UuidInterface
$ns string | UuidInterface The UUID namespace to use
$name string The string to hash together with the namespace
$version integer The version of UUID to create (3 or 5)
$hashFunction string The hash function to use when hashing together the namespace and name
return UuidInterface
    protected function uuidFromNsAndName($ns, $name, $version, $hashFunction)
    {
        if (!$ns instanceof UuidInterface) {
            $ns = $this->codec->decode($ns);
        }
        $hash = call_user_func($hashFunction, $ns->getBytes() . $name);
        return $this->uuidFromHashedName($hash, $version);
    }