Generate four type-4 GUIDs for me The type 4 GUID is described by Wikipedia, quoth:


  Version 4 UUIDs use a scheme relying only on random numbers. This algorithm sets the version number (4 bits) as well as two reserved bits. All other bits (the remaining 122 bits) are set using a random or pseudorandom data source. Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is any hexadecimal digit and y is one of 8, 9, A, or B (e.g., f47ac10b-58cc-4372-a567-0e02b2c3d479).


Write a program that loads 488 bits (61 bytes) of cryptographic quality randomness and output them as 4 GUIDs using the format quoted above.


Do not waste randomness. 

All random bits must appear in the encoded output.
All encoded bits must be traceable to either a single random bit or one of the six fixed bits that must appear in each GUID.

Use the cryptographic quality random number generator supplied by your language's standard library.
Do not use a library or external resource that generates GUIDs.
The hyphens must appear in their correct positions.
The fixed bits of this form of GUID must appear in their correct positions.
You may use a standard library function designed to output a GUID from 128 bits.
Normal code-golf rules apply.


For example...

&gt; gentype4
6FA53B63-E7EA-4461-81BE-9CD106A1AFF8
856970E9-377A-458E-96A7-43F587724573
E4F859AC-0004-4AA1-A3D2-AECB527D1D24
766811C5-0C44-4CC8-8C30-E3D6C7C6D00B


Update:
I asked for four GUIDs in order to allow a whole number of random bytes to be gathered without leaving any remainder. I also specified that none of the bits should be wasted in order to avoid the easy answer of getting 16 random bytes and dropping the 4 in. (No, shift the other bits along first.)

Update 2:
If your language's standard library doesn't have a cryptographic quality random byte generator, you may instead assume that there is a 61 byte file present with enough random bytes for you to use when the program starts. The file should be called "/dev/urandom" or another filename with 12 characters.
PHP, 338 bytes
&lt;?php $r=openssl_random_pseudo_bytes(61);$b=&quot;&quot;;$s=&quot;substr&quot;;for($i=0;$i&lt;61;)$b.=str_pad(decbin(ord($r[$i++])),8,0,0);function p($B,$L){return str_pad(dechex(bindec($B)),$L,0,0);}for($i=0;$i&lt;4;$i++)echo p($s($b,$p=122*$i,32),8).&quot;-&quot;.p($s($b,$p+32,16),4).&quot;-4&quot;.p($s($b,$p+48,12),3).&quot;-&quot;.p(&quot;10&quot;.$s($b,$p+60,14),4).&quot;-&quot;.p($s($b,$p+74,48),12).&quot;\n&quot;;

Some output
&gt; php 32309.min.php
635fa088-4a66-47fc-9e50-2ccb2445b643
6e5c23c7-ba16-427e-960b-5316980ce4e3
fdb570ca-2e5e-4594-ab2e-db8446599b8f
203f2538-b5f4-47f0-89ac-012ca14b2f99
&gt; php 32309.min.php
a6981255-0ab2-4d82-aab4-d1c64d2bb7eb
c348e728-f817-45d2-9bbf-b40426baa461
9b2baed2-e58b-41ef-a6fb-57e96db74a68
63e464e7-ab55-4e2a-a2a0-abdc535481dc
&gt; php 32309.min.php
af7e68d3-b3ed-4e19-85b2-280270f746c6
0a86c610-8d0c-4c0a-bafe-44a6886d71f8
98c742b8-6a3b-47ff-97c7-ccab70d79a3c
59a93afc-ff81-4c97-a57b-72f0de384acb
&gt; php 32309.min.php
72b352fc-0174-4051-969e-cacc0adbf941
50e4f859-76fe-45f6-baf5-d5fcceb41f72
5a18408e-6e7e-43a6-bd71-09d22a0fbf14
ae5a1391-5367-467e-8ecc-785ca72cbf95

Ungolfed
&lt;?php
$r = openssl_random_pseudo_bytes(61);
$b = &quot;&quot;;
$s = &quot;substr&quot;;
for($i=0 ; $i&lt;61 ;) $b .= str_pad(decbin(ord($r[$i++])), 8, 0, 0);

function p($B, $L) {
    return str_pad(dechex(bindec($B)), $L, 0, 0);
}

for($i=0 ; $i&lt;4 ; $i++) {
    echo p($s($b, 122*$i, 32), 8).&quot;-&quot;;
    echo p($s($b, 122*$i+32, 16), 4).&quot;-4&quot;;
    echo p($s($b, 122*$i+48, 12), 3).&quot;-&quot;;
    echo p(&quot;10&quot;.$s($b, 122*$i+60, 14), 4).&quot;-&quot;;
    echo p($s($b, 122*$i+74, 48), 12).&quot;\n&quot;;
}