The 32 bytes were just a product of the hash function that we were using, but I've simplified it by changing the hash function to one that only generates 8 bytes.
func EmailToID(email, salt string) int64 {
d := sha3.NewShake256()
d.Write([]byte(email))
d.Write([]byte(salt))
h := make([]byte, 8)
d.Read(h)
var n int64
buff := bytes.NewBuffer(h)
binary.Read(buff, binary.LittleEndian, &n)
if n < 0 {
n *= -1
}
return n
}
So, I'm actually using all 64 bits, but taking the absolute value of the resulting int64, which in effect means that I'm only considering 63 bytes.