Let's say the hash function is chosen from a class of hash functions H, which maps messages into D, the set of possible message digests.
But this definition is not strong enough - if the possible messages are 0 and 1, D={0,1} and H consists of the identity operation and not, H is universal.