PHP code example of caridea / random

1. Go to this page and download the library: Download caridea/random library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

caridea / random example snippets


if (\Caridea\Random\Mcrypt::isAvailable()) {
    $rando = new \Caridea\Random\Mcrypt();
    $bytes = $rando->generate(32);
}
if (\Caridea\Random\OpenSsl::isAvailable()) {
    $rando = new \Caridea\Random\OpenSsl();
    $bytes = $rando->generate(32);
}