You can't, really. Well, not apart from returning a constant value.
Look at it this way... all people with email "x" have to have the same hash code, because they're equal. And all people with name "y" have to have the same hash code, and so it goes on:
Name Email Hash
n1 e1 h1
n2 e1 h1 (because emails are equal
n2 e2 h1 (because names are equal to previous)
Note how we've managed to change both the name and the email to arbitrary values, but the hash has to still be h1.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…