<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: UUID generator for PHP</title>
	<atom:link href="http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/</link>
	<description>Mostly miscellaneous technical mumbo-jumbo.</description>
	<lastBuildDate>Fri, 10 Feb 2012 04:51:21 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: elmimmo</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-5172</link>
		<dc:creator>elmimmo</dc:creator>
		<pubDate>Wed, 11 Jan 2012 10:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-5172</guid>
		<description>Oops, just to note, I do not get the same UUID v5 with OSSP uuid removing the http:// with either, just like


uuid -v5 6ba7b810-9dad-11d1-80b4-00c04fd430c8 www.widgets.com</description>
		<content:encoded><![CDATA[<p>Oops, just to note, I do not get the same UUID v5 with OSSP uuid removing the http:// with either, just like</p>
<p>uuid -v5 6ba7b810-9dad-11d1-80b4-00c04fd430c8 <a href="http://www.widgets.com" rel="nofollow">http://www.widgets.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zapytaj</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-5153</link>
		<dc:creator>zapytaj</dc:creator>
		<pubDate>Sun, 25 Dec 2011 04:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-5153</guid>
		<description>&lt;strong&gt;zapytaj...&lt;/strong&gt;

[...]UUID generator for PHP « shapeshifter.se[...]...</description>
		<content:encoded><![CDATA[<p><strong>zapytaj&#8230;</strong></p>
<p>[...]UUID generator for PHP « shapeshifter.se[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phpcassaからTimeUUID使うときにuuid.phpがバグってた件 &#124;</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-4286</link>
		<dc:creator>phpcassaからTimeUUID使うときにuuid.phpがバグってた件 &#124;</dc:creator>
		<pubDate>Mon, 04 Apr 2011 16:26:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-4286</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lysender</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-2763</link>
		<dc:creator>Lysender</dc:creator>
		<pubDate>Wed, 10 Mar 2010 05:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-2763</guid>
		<description>I have modified them so that it will convert binary back to string or byte etc

    static private function conv_bin2byte($src) {
        // array_merge - reindex since unpack starts at index 1
        return array_merge(unpack(&#039;C16&#039;, $src));
    }
    
    static private function conv_bin2field($src) {
        $byte = self::conv_bin2byte($src);
        return self::conv_byte2field($byte);
    }
    
    static private function conv_bin2string($src) {
        $byte = self::conv_bin2byte($src);
        return self::conv_byte2string($byte);
    }</description>
		<content:encoded><![CDATA[<p>I have modified them so that it will convert binary back to string or byte etc</p>
<p>    static private function conv_bin2byte($src) {<br />
        // array_merge &#8211; reindex since unpack starts at index 1<br />
        return array_merge(unpack(&#8217;C16&#8242;, $src));<br />
    }</p>
<p>    static private function conv_bin2field($src) {<br />
        $byte = self::conv_bin2byte($src);<br />
        return self::conv_byte2field($byte);<br />
    }</p>
<p>    static private function conv_bin2string($src) {<br />
        $byte = self::conv_bin2byte($src);<br />
        return self::conv_byte2string($byte);<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lysender</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-2762</link>
		<dc:creator>Lysender</dc:creator>
		<pubDate>Wed, 10 Mar 2010 04:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-2762</guid>
		<description>How do I convert a binary back to string or byte or field? 

Uuid::convert($id, Uuid::FMT_BINARY, Uuid::FMT_STRING) 

is not yet supported. It is just now that I notice the problem.</description>
		<content:encoded><![CDATA[<p>How do I convert a binary back to string or byte or field? </p>
<p>Uuid::convert($id, Uuid::FMT_BINARY, Uuid::FMT_STRING) </p>
<p>is not yet supported. It is just now that I notice the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Universally Unique Identifier (UUID) in PHP und MySQL &#187; Webmaid.de</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-2756</link>
		<dc:creator>Universally Unique Identifier (UUID) in PHP und MySQL &#187; Webmaid.de</dc:creator>
		<pubDate>Thu, 25 Feb 2010 08:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-2756</guid>
		<description>[...] und als Klasse bereit gestellt. Bei der Suche im Netz habe ich zwei Varianten entdeckt: DrUUID und UUID Generator. Außerdem kann man auch das PECL Package uuid nutzen, welches jedoch die libuuid (des Projekts [...]</description>
		<content:encoded><![CDATA[<p>[...] und als Klasse bereit gestellt. Bei der Suche im Netz habe ich zwei Varianten entdeckt: DrUUID und UUID Generator. Außerdem kann man auch das PECL Package uuid nutzen, welches jedoch die libuuid (des Projekts [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavitron</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-2633</link>
		<dc:creator>Gavitron</dc:creator>
		<pubDate>Thu, 17 Dec 2009 20:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-2633</guid>
		<description>Actually, after several hours of testing, I have identified a significant bug in this implementation.  If you generate a version 3 or 5 UUID, using a namespace UUID with the first byte &gt; 8, your code overflows, and generates invalid UUIDs.  further, this invalid UUID is the same for all namespace UUIDs &gt;80000000-0000-0000-0000-00000000000</description>
		<content:encoded><![CDATA[<p>Actually, after several hours of testing, I have identified a significant bug in this implementation.  If you generate a version 3 or 5 UUID, using a namespace UUID with the first byte &gt; 8, your code overflows, and generates invalid UUIDs.  further, this invalid UUID is the same for all namespace UUIDs &gt;80000000-0000-0000-0000-00000000000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-2102</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 25 Aug 2009 20:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-2102</guid>
		<description>Thanks for the great class!

One note is that many implementations claim that the example for version 3 as shown in RFC4122 is incorrect (OSSP uuid, python) where the value generated should actually be 3d813cbb-47fb-32ba-91df-831e1593ac29.  If one needs compatibility with these (and other) libraries for version 3/5 one can remove lines 163-165 and 180-182 (byte swapping lines) and get matching results.</description>
		<content:encoded><![CDATA[<p>Thanks for the great class!</p>
<p>One note is that many implementations claim that the example for version 3 as shown in RFC4122 is incorrect (OSSP uuid, python) where the value generated should actually be 3d813cbb-47fb-32ba-91df-831e1593ac29.  If one needs compatibility with these (and other) libraries for version 3/5 one can remove lines 163-165 and 180-182 (byte swapping lines) and get matching results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fli</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-1879</link>
		<dc:creator>fli</dc:creator>
		<pubDate>Tue, 07 Jul 2009 14:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-1879</guid>
		<description>The bugs mentioned in the posts above should have been fixed now.</description>
		<content:encoded><![CDATA[<p>The bugs mentioned in the posts above should have been fixed now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonovic</title>
		<link>http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php/comment-page-1/#comment-1615</link>
		<dc:creator>jonovic</dc:creator>
		<pubDate>Wed, 27 May 2009 13:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.shapeshifter.se/?p=352#comment-1615</guid>
		<description>I&#039;ve tried on Php 5.2.6 on Windows and fall into trouble with random generation. Time_low part is generated using mt_rand with interval set to 0,0xffffffff. The mt_rand function however uses signed integer for parameter and that&#039;s why the resulting value is always negative. When passing to sprintf the result of time_low part is always 0.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried on Php 5.2.6 on Windows and fall into trouble with random generation. Time_low part is generated using mt_rand with interval set to 0,0xffffffff. The mt_rand function however uses signed integer for parameter and that&#8217;s why the resulting value is always negative. When passing to sprintf the result of time_low part is always 0.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

