Adds hash validation for references