USING DCFLDD
The United States Department of Defense Computer Forensics Lab developed an enhanced version of dd known as dcfldd. This tool adds several forensics features to dd. One of the most important features is the ability to calculate hashes on the fly. The calculated hashes may be sent to a file, displayed in a terminal (default), or both.
In addition to calculating an overall hash, dcfldd can compute hashes for chunks of data (which it calls windows). As of this writing, dcfldd supports the following hash algorithms: MD5, SHA1, SHA256, SHA384, and SHA512. Multiple hash algorithms may be used simultaneously with hashes written to separate files.
The general format for using dcfldd to create an image with hashes in a separate file is dcfldd if= bs=