hash code for material