Added an option to the digest command to allow the user to create a new command, use it to add data to a hash, and to get the final message digest.
Refactored code to move common digest init, update, and finalize operations into common functions.