Rewritted lib

After rewrite Hashids encrypt/decrypt corresponds to the official library (js).

Needs refactoring, because I'm not an expert in python