Support different length hash compare.