From this PDF, we see that ClamAV looks at certain sections in a PE file (executable or dynamic library) in order to build a fingerprint it can match up with its CVD format file. They mention that I can use the *.mdb file and the *.msb file (inside the CVD file) to find md5, sha1, and sha256 hashes of the PE sections of a PE file.
How, in C++ or C, do I programmatically open a PE file, find these sections, and match them against these hashes?