Adding code to emulate the hashing algo in ioffice