C++11 port of a JavaScript library to generate YouTube-like hashids from one or many numbers.
This library is at the earliest stage of development and is being developed and tested on Mac OS X 10.11.5.
C++11 compatible compiler (earlier C++ standards are not supported).
#include "Hashids.h"
auto hashids = Hashids("this is my salt", 8);
auto id = hashids.encode(12345);
id
is going to be
B0NkK9A5
You can also pass several numbers
#include "Hashids.h"
auto hashids = Hashids("this is my salt", 8);
auto id = hashids.encode({1, 2, 3, 4, 5});
In this case id
is going to be
zoHWuNhktp