名称
Hashids - 从数字生成短哈希
概要
use Hashids;
my $hashids = Hashids->new('this is my salt');
# encrypt a single number
my $hash = $hashids->encode(123); # 'YDx'
my $number = $hashids->decode('YDx'); # 123
# or a list
$hash = $hashids->encode(1, 2, 3); # 'eGtrS8'
my @numbers = $hashids->decode('laHquq'); # (1, 2, 3)
# also get results in an arrayref
my $numbers = $hashids->decode('l
2021-07-02 15:03:41
15KB
Perl
1