PHP code example of davidfricker / basechanger

1. Go to this page and download the library: Download davidfricker/basechanger 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/ */

    

davidfricker / basechanger example snippets


use DavidFricker\BaseChanger\GMP;

$bytes = openssl_random_pseudo_bytes(32);
$base = 64;

$base_converted = GMP::changeTo($bytes, $base);
$base_reversed = GMP::changeFrom($base_converted, $base);