Next: Multi-Precision-Integer Subsystem Architecture, Previous: Symmetric Encryption Subsystem Architecture, Up: Architecture
The interface to work with message digests and CRC algorithms is made
up of functions from the gcry_md_ name space. The
implementation follows the open-use-close paradigm and uses registered
algorithm modules for the actual work. Although CRC algorithms are
not considered cryptographic hash algorithms, they share enough
properties so that it makes sense to handle them in the same way.
It is possible to use several algorithms at once with one context and
thus compute them all on the same data.
The most important functions are:
gcry_md_opengcry_md_enablegcry_md_setkeygcry_md_writegcry_md_putcgcry_md_write implemented as a macro.
gcry_md_readgcry_md_closegcry_md_hash_bufferThere are also functions to query properties of algorithms or the instance, like enabled algorithms, digest length, map algorithm names. it is also possible to reset an instance or to copy the current state of an instance at any time. Debug functions to write the hashed data to files are available as well.