The MHL tool is a reference implementation for creating and verifying MHL files. It’s a cross-platform command line tool, available for Mac OS X, Linux and Windows.
The MHL tool has currently several subcommands: ‘seal’, ‘verify’, ‘hash’, ‘file’ and ‘help’. They vary in complexity and in their input and output arguments: ‘files and folders’, ‘hashes’ and ‘MHL files’. Below is an illustration of the relations between subcommands and arguments.
This is the preferred command to seal the contents of folders. ‘mhl seal’ takes folders as input and outputs an MHL file. The created MHL file references all files in the input folder and generates hashes for them.
This is the preferred command to verify folders by MHL files. ‘mhl verify’ takes folders as input, searches for MHL files in them and outputs information about the consistency and completeness of the MHL files.
This is the command to create hashes from files and to verify if a hash matches a file. ‘mhl hash’ either takes files as input and outputs hashes for them or it takes pairs of hashes and files and outputs matching info.
This is the command to create MHL files from pairs of hashes and files. Furthermore, it is the command to parse MHL files and output the contained pairs of hashes and files.
Note: The signing feature is currently not part of the MHL tool and is planned for a future update.
This is the command to sign MHL files with a personal certificate. It takes an MHL file and a certificate as input and output an MHL file, which contains the encrypted hash of the MHL file content.