3 # Generate a list of rotation vectors so we always use the same set.
4 # This needs to be run on a platform with /dev/urandom.
9 sysopen(UR
, '/dev/urandom', O_RDONLY
) or die;
13 print "\@random_sv_vectors = (\n";
16 for ($i = 0; $i < $n; $i++) {
19 die if (sysread(UR
, $x4, 4) != 4);
20 @n = unpack("C*", $x4);
26 } while ($n[0] == 0 || $n[1] == 0 || $n[2] == 0 || $n[3] == 0 ||
27 $n[0] == $n[3] || $n[1] == $n[2]);
29 $xl = sprintf(" [%d,%d,%d,%d]%s",
30 $n[0], $n[1], $n[2], $n[3],
31 ($i == $n-1) ?
'' : ',');
32 if (length($outl.$xl) > $maxlen) {