|
@ -2,21 +2,21 @@ BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } } |
|
|
|
|
|
|
|
|
use encode qw(encode_basen decode_basen); |
|
|
use encode qw(encode_basen decode_basen); |
|
|
|
|
|
|
|
|
my $msg = 'no work yet !'; |
|
|
|
|
|
|
|
|
my @msg = ( |
|
|
|
|
|
'no work yet !', |
|
|
|
|
|
'genesis nonce', |
|
|
|
|
|
'default nonce for block address', |
|
|
|
|
|
'initial nonce' |
|
|
|
|
|
); |
|
|
|
|
|
for my $msg (@msg) { |
|
|
|
|
|
print "msg: $msg\n"; |
|
|
my $nonce = unpack 'Q',&decode_basen($msg,29); |
|
|
my $nonce = unpack 'Q',&decode_basen($msg,29); |
|
|
printf "nonce: %s\n",$nonce; |
|
|
printf "nonce: %s\n",$nonce; |
|
|
printf "nonce16: %s\n",unpack'H*',pack('Q',$nonce); |
|
|
printf "nonce16: %s\n",unpack'H*',pack('Q',$nonce); |
|
|
printf "monce29: %s\n",&encode_basen(pack('Q',$nonce),29); |
|
|
printf "monce29: %s\n",&encode_basen(pack('Q',$nonce),29); |
|
|
|
|
|
print ".\n"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
my $nonce = unpack 'Q',&decode_basen('genesis nonce',29); |
|
|
|
|
|
printf "nonce: %s\n",$nonce; |
|
|
|
|
|
printf "nonce16: %s\n",unpack'H*',pack('Q',$nonce); |
|
|
|
|
|
printf "monce29: %s\n",&encode_basen(pack('Q',$nonce),29); |
|
|
|
|
|
|
|
|
|
|
|
my $nonce = unpack 'Q',&decode_basen('initial nonce',29); |
|
|
|
|
|
printf "nonce: %s\n",$nonce; |
|
|
|
|
|
printf "nonce16: %s\n",unpack'H*',pack('Q',$nonce); |
|
|
|
|
|
printf "monce29: %s\n",&encode_basen(pack('Q',$nonce),29); |
|
|
|
|
|
|
|
|
|
|
|
$msg = &encode_basen("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF",29); |
|
|
$msg = &encode_basen("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF",29); |
|
|
printf "msg: %s\n",$msg; |
|
|
printf "msg: %s\n",$msg; |
|
|