hashids: Generate Short Unique YouTube-Like IDs (Hashes) from Integers

An R port of the hashids library. hashids generates YouTube-like hashes from integers or vector of integers. Hashes generated from integers are relatively short, unique and non-seqential. hashids can be used to generate unique ids for URLs and hide database row numbers from the user. By default hashids will avoid generating common English cursewords by preventing certain letters being next to each other. hashids are not one-way: it is easy to encode an integer to a hashid and decode a hashid back into an integer.

Author
Alex Shum [aut, cre], Ivan Akimov [aut] (original author of hashids -- implemented in javascript), David Aurelio [ctb] (implemented hashids in python 2 and 3)
Date of publication
2015-09-11 10:10:26
Maintainer
Alex Shum <Alex@ALShum.com>
License
MIT + file LICENSE
Version
0.9.0
URLs

View on CRAN

Man pages

ascii_val
Calculate the ascii value number of a character
base16_to_dec
Converts a base 16 string to a base 10 number. Because I...
decode
Decodes a hashid into the original integer or integer vector
decode_hex
Decodes a hashid into the original hexidecimal number
dec_to_base16
Converts a base 10 number to base 16 number. Because I...
encode
Encodes an integer or integer vector into a hashid string....
encode_hex
Encodes a hexademical number into a hashid
enforce_min_length
Enforces hashid minimum length by padding the hashid with...
hash
Maps an integer to a string. Generated string will be...
hashid_defaults
Default Values for hashid settings
hashid_settings
A function to create a hashid settings list.
shuffle
Permutes the characters in a string based on an inputted salt...
split
Splits a string based on a set of splitting characters
unhash
Unhashes a string to an integer based on alphabet.

Files in this package

hashids
hashids/tests
hashids/tests/testthat.R
hashids/tests/testthat
hashids/tests/testthat/test_decode.R
hashids/tests/testthat/test_encode.R
hashids/NAMESPACE
hashids/R
hashids/R/defaults.R
hashids/R/hash.R
hashids/README.md
hashids/MD5
hashids/DESCRIPTION
hashids/man
hashids/man/hash.Rd
hashids/man/hashid_settings.Rd
hashids/man/decode_hex.Rd
hashids/man/unhash.Rd
hashids/man/decode.Rd
hashids/man/split.Rd
hashids/man/dec_to_base16.Rd
hashids/man/encode.Rd
hashids/man/encode_hex.Rd
hashids/man/enforce_min_length.Rd
hashids/man/hashid_defaults.Rd
hashids/man/base16_to_dec.Rd
hashids/man/shuffle.Rd
hashids/man/ascii_val.Rd
hashids/LICENSE