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.

20 lines
437 B

  1. #!/usr/bin/perl
  2. BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
  3. use seed qw(rand64);
  4. use encode qw(mbase58 mbase36 mbase16);
  5. my $seed = &seed::setseed('testing mbase* subroutines');
  6. my $r = rand64();
  7. my $q = pack'Q',$r;
  8. printf "seed: %s\n",$seed;
  9. printf "r: %s\n",$r;
  10. printf "q: 0x%s\n",unpack'H*',$q;
  11. printf "r58: %s\n",&mbase58($q);
  12. printf "r36: %s\n",&mbase36($q);
  13. printf "r16: %s\n",&mbase16($q);
  14. exit $?;
  15. 1;