Skip to content

Hashids — generate short and reversable hashes from numbers

License

Notifications You must be signed in to change notification settings

kalkin/perl6-hashids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Hashids — generate short and reversable hashes from numbers.

Build Status

SYNOPSIS

    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);        # 'laHquq'
    my @numbers = $hashids.decode('laHquq'); # (1, 2, 3)

DESCRIPTION

Hashids is designed for use in URL shortening, tracking stuff, validating accounts or making pages private (through abstraction.) Instead of showing items as 1, 2, or 3, you could show them as b9iLXiAa, EATedTBy, and Aaco9cy5. Hashes depend on your salt value.

This is a port of the Hashids JavaScript library for Perl 6.

IMPORTANT: This implementation follows the v1.0.0 API release of hashids.js.

AUTHOR

Bahtiar kalkin- Gadimov [email protected]

Follow me @_kalkin Or https://bahtiar.gadimov.de/

COPYRIGHT

Copyright 2016 Bahtiar kalkin- Gadimov.

LICENSE

MIT License. See the LICENSE file. You can use Hashids in open source projects and commercial products.

About

Hashids — generate short and reversable hashes from numbers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Other 100.0%