1. A method for executing a message digest instruction in a computer system, the computer system comprising a plurality of general registers, a general purpose processor in communications with a computer memory, the general purpose processor comprising one or more execution units, the execution units executing instructions fetched from computer memory, the method comprising the steps of: fetching a message digest instruction; responsive to fetching the message digest instruction, determining from a previously defined function code a message digest operation to be executed, the previously defined function code defining any one of a compute message digest operation or a function query operation; when the determined compute message digest operation to be executed is a compute message digest operation, performing the compute message digest operation on an operand, the compute message digest operation comprising performing a hashing algorithm.