msolomatin / hashids.cpp

C++11 port of a JavaScript library to generate YouTube-like hashids from one or many numbers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Hashids

Description

C++11 port of a JavaScript library to generate YouTube-like hashids from one or many numbers.

Alpha

This library is at the earliest stage of development and is being developed and tested on Mac OS X 10.11.5.

Requirements

C++11 compatible compiler (earlier C++ standards are not supported).

Basic Example

#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

About

C++11 port of a JavaScript library to generate YouTube-like hashids from one or many numbers.


Languages

Language:C++ 100.0%