PHP code example of unitpay / shamir
1. Go to this page and download the library: Download unitpay/shamir 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/ */
unitpay / shamir example snippets
$secret = 'Some super secret';
$parts = 5;
$threshold = 3;
$shares = Shamir::split($secret, $parts, $threshold);
$recoveredSecret = Shamir::reconstruct([$parts[1], $parts[0], $parts[3]]);