hash/unhash & consistent shuffle functions ported
hashids effective alphabet initialization ported