This lab contains the code from this repo and nothing else. The following code is run to generate a million 1 character randoms from a set of lowercase letters and single digits.
<?php // Iterate the number of letters needed
for ( $Iterate = 0; $Iterate < $Length; $Iterate++ ) {
$String .= $String_Characters[hexdec(bin2hex(openssl_random_pseudo_bytes(1))) % $String_Characters_Count];
}
As the chart in the lab shows, a, b, c, and d are far more likely to be generated than any other combination. They appear at the beginning of the string, not half-way through, so I assume that code is generating 1, 2, 3, and 4 more than others. Perhaps this is something todo with the % ?
Aucun commentaire:
Enregistrer un commentaire