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.
|
|
#!/usr/bin/perl
BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } } use misc qw(khash); use encode qw(mbase58 mbase36 mbase16);
my $hash;
$hash = &khash('MD5',undef); printf "md5: %s\n",mbase16($hash); $hash = &khash('SHA1',undef); printf "sha1: %s\n",mbase16($hash); $hash = &khash('SHA256',undef); printf "sha2: %s\n",mbase16($hash);
$hash = &khash('SHA256','Hello World!'); printf "kh58: %s\n",mbase58($hash);
$hash = &khash('SHA3_224','Hello World!'); printf "kh36: %s\n",mbase36($hash);
exit $?; 1;
|