PHP code example of arokettu / unsigned
1. Go to this page and download the library: Download arokettu/unsigned 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/ */
arokettu / unsigned example snippets
use Arokettu\Unsigned as u;
$a = u\from_int(1234567890123456789, 24); // use 24-byte a.k.a. 192-bit arithmetic
$b = u\from_hex('123456789abcdef01234567890abcdef', 24); // numbers must have same bitness
// 1234567890123456789 * 0x123456789abcdef01234567890abcdef =
$c = u\mul($a, $b);
var_dump(u\to_dec($c)); // 29873897512945703720213152879288233401251320475301467035