A TSQL port for hashids.org.