PHP code example of cast / lyra2

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

    

cast / lyra2 example snippets


composer 



ast\Crypto\uint64\Uint64 as uint64;
use function Cast\Crypto\Lyra2\lyra2;
use function Cast\Crypto\Lyra2\padBlock;

$pwd  = hex2bin('3632b64528815b66875e7feb9be68fe3e0e502dd405d7910c23f16e6b6ffeef7');
$salt = hex2bin('3632b64528815b66875e7feb9be68fe3e0e502dd405d7910c23f16e6b6ffeef7');
$lyra2result = padBlock('', 32);
lyra2($lyra2result, $pwd, $salt, uint64::new(0, 1), 4, 4);

var_dump(bin2hex($lyra2result)); // 48b0451a8d5afcfe0b8622f6bdb1945fde5d7945b24c6bf04212d11788629b1e