1. Go to this page and download the library: Download leigh/poly1305 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/ */
leigh / poly1305 example snippets
$mac = Poly1305\authenticate($key, $message);
$valid = Poly1305\verify($mac, $key, $message);
$auth = new Poly1305\Authenticator;
// Context preserves state between updates
$ctx = $auth->init($key);
while($messageChunk = getChunk()) {
$auth->update($ctx, $messageChunk);
}
$mac = $poly1305->finish($ctx);