encodeHash: Removed the use of the BITS array.