Added default value for format for hmac() and hash().
Regenerated the error messages, due to the modification of the spec.