Add macro to calculate a hash from a part of the message id