protected function getFromNameAndNs($namespace, $name, $hash)
    {
        $nhex = str_replace(array('-','{','}'), '', $namespace);
        $nstr = '';

        for($i = 0; $i < strlen($nhex); $i+=2)
		{
			$nstr .= chr(hexdec($nhex[$i].$nhex[$i+1]));
		}

        return $hash($nstr . $name);
    }
protected function getFromNameAndNs($namespace, $name, $hash)
    {
        $nhex = str_replace(array('-','{','}'), '', $namespace);
        $nstr = '';

        for($i = 0; $i < strlen($nhex); $i+=2)
		{
			$nstr .= chr(hexdec($nhex[$i].$nhex[$i+1]));
		}

        return $hash($nstr . $name);
    }
protected function getFromNameAndNs ( $ namespace , $ name , $ hash ) { $ nhex = str_replace ( array ( '-' , '{' , '}' ) , '' , $ namespace ) ; $ nstr = '' ; for ( $ i = 0 ; $ i < strlen ( $ nhex ) ; $ i += 2 ) { $ nstr .= chr ( hexdec ( $ nhex [ $ i ] . $ nhex [ $ i + 1 ] ) ) ; } return $ hash ( $ nstr . $ name ) ; }
Generate hash from, namespace and hash function.

@param $namespace UUID
@param $name string
@param $hash
@return mixed
Generate hash from namespace and hash function .