PHP code example of axpwx / base91

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

    

axpwx / base91 example snippets



use Axpwx\Base91;

Base91::encode('encode this string');
//=> toX<5+UCmUW6GFso^zZ2(.A


use Axpwx\Base91;

Base91::decode('toX<5+UCmUW6GFso^zZ2(.A');
//=> encode this string


use Axpwx\Base91;

//待编码的16进制字符串支持负数,支持非偶数前缀补0
Base91::encodeHex('356c1772936a14d19df15ae2f48342cf6ce8e187');
//=> fiGv9N=Y+[,*taK{GHUSo/fsI


use Axpwx\Base91;

Base91::decodeHex('fiGv9N=Y+[,*taK{GHUSo/fsI');
//=> 356c1772936a14d19df15ae2f48342cf6ce8e187