An MD5 C-mex function for MATLAB. It takes less than 1 minute for a 700MB file size.


Updated 14 Jul 2005

No License

This MATLAB version MD5 is for checksum of files and strings. The speed is very fast. A timer shows time taken to finish the process in seconds.

Just type: mMD5('filename') for a file or mMD5('string') for a string, eg., mMD5('abcd').

Reference: Tian-tai Huynh, MD5 in C

Cite As

Steven Huang (2023). MD5 in MATLAB (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Simulation OFDMA, GetMD5

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

That is a good point to have the MD5 sum output stored in a string. The file has been updated. To use this function, just do:
% for a file:
a = mMD5('contents.m')
% for a string:
a = mMD5('abcd')
the MD5 sum now is saved in variable a.