What is the primary purpose for using a hash algorithm for a message?