Improved hash decoding