You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
699 B

BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
use encode qw(encode_basen decode_basen);
my $msg = 'no work yet !';
my $nonce = unpack 'Q',&decode_basen($msg,29);
printf "nonce: %s\n",$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: 0x%x\n",$nonce;
printf "monce29: %s\n",&encode_basen(pack('Q',$nonce),29);
$msg = &encode_basen("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF",29);
printf "msg: %s\n",$msg;
my $m29 = &decode_basen($msg.$msg,29);
printf "m29: %s (%dc)\n",join('_',unpack('Q*',$m29)),length($m29);
printf "m16: %s\n",unpack('H*',$m29);
exit $?;
1;