Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Functions/+BpodLib/+dataio/HashFile.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function hash = HashFile(filename)
%HashFile - Compute the hash of a file with MD5
% HASH = HashFile(filename)
% The hash is returned as a string of hexadecimal digits computed using the MD5 message-digest algorithm.
% In windows the MD5 hash can be found with the command `certutil -hashfile filename MD5`.
%
% See also BpodLib.external.DataHash.DataHash.

% This function requires the DataHash function by Jan Simon.
% MATLAB FEX: http://www.mathworks.com/matlabcentral/fileexchange/31272
% The DataHash function is distributed under the BSD license.

hash = BpodLib.external.DataHash.DataHash(filename, 'file');

end
Loading