This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = isset($_POST['string']) ? $_POST['string'] : null; | |
$selected_algo = isset($_POST['algo']) ? $_POST['algo'] : null; | |
if (!empty($string) && !empty($selected_algo )) | |
{ | |
if (in_array($selected_algo, hash_algos())) { | |
echo 'The ',$selected_algo, ' for ( <b>', $string, '</b> ) is => ', hash($selected_algo, $string, false); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
node depanancies: | |
npm install bignum | |
*/ | |
var bignum = require('bignum'); | |
var diff1 = bignum('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 16); | |
// This is what miner submits | |
var powHash; |