]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/random_compat/random_bytes_com_dotnet.php
WordPress 4.6.3-scripts
[autoinstalls/wordpress.git] / wp-includes / random_compat / random_bytes_com_dotnet.php
index 0a781f4efa314ba740dba90c88aef1ca50dc3383..34228254921cadc14e4f346b855090c0ce3021ba 100644 (file)
@@ -46,14 +46,17 @@ function random_bytes($bytes)
             'random_bytes(): $bytes must be an integer'
         );
     }
+
     if ($bytes < 1) {
         throw new Error(
             'Length must be greater than 0'
         );
     }
+
     $buf = '';
     $util = new COM('CAPICOM.Utilities.1');
     $execCount = 0;
+
     /**
      * Let's not let it loop forever. If we run N times and fail to
      * get N bytes of random data, then CAPICOM has failed us.
@@ -68,6 +71,7 @@ function random_bytes($bytes)
         }
         ++$execCount; 
     } while ($execCount < $bytes);
+
     /**
      * If we reach here, PHP has failed us.
      */