Generalisation of a message digest algorithm