MD5 in MATLAB

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

You are now following this Submission

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 (2026). MD5 in MATLAB (https://in.mathworks.com/matlabcentral/fileexchange/7919-md5-in-matlab), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: Simulation OFDMA, GetMD5

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

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')
or
% for a string:
a = mMD5('abcd')
the MD5 sum now is saved in variable a.