File Exchange

image thumbnail

MD5 signature of a file

version 1.0 (5.05 KB) by

A one-file MATLAB implementation of MD5, no additional files needed.



No License

d = md5(f)

Computes the MD5 has function of the file specified in the string f and returns it as a 64-character array in d.

md5() is a single m-file and no additional libraries or toolboxes are needed. The code is compact and clear, but very slow. So md5() is
useful for educational purposes.

Comments and Ratings (4)

It doesn't return the same output if I hack it to take in just a string as an online implementation, but at least I can run this one on Octave. I have the feeling my hack broke something, but self-consistency of my code is more important than actually finding the MD5.

Thanks a lot for this submission.

Good job.Thanks!

Jan Simon

Jan Simon (view profile)

Help exists, H1-line, Matlab version is checked, comments in the source, selftest function included.
Files are opened in text mode, better use FOPEN(File, 'rb'). Unfortunately the selftest function fails (Matlab 7.7) - otherwise it would be a 5 star rating.

mohamed khamis

i tried to run this file but there is some missed deffinitions..plzz send me the complete hash program cause i really need it..thanks

MATLAB Release
MATLAB 7 (R14)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video