Home > vbmeg > functions > common > utility > vb_mMD5.m

vb_mMD5

PURPOSE ^

Create MD5 hash key from file

SYNOPSIS ^

function [digest] = vb_mMD5(file)

DESCRIPTION ^

 Create MD5 hash key from file
 [USAGE]
    key = vb_mMD5(file);
 [IN]
    file : MD5 hash key is created from this file
 [OUT]
    digest : MD5 hash key


 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [digest] = vb_mMD5(file)
0002 % Create MD5 hash key from file
0003 % [USAGE]
0004 %    key = vb_mMD5(file);
0005 % [IN]
0006 %    file : MD5 hash key is created from this file
0007 % [OUT]
0008 %    digest : MD5 hash key
0009 %
0010 %
0011 % Copyright (C) 2011, ATR All Rights Reserved.
0012 % License : New BSD License(see VBMEG_LICENSE.txt)
0013 
0014 %
0015 % --- Previous check
0016 %
0017 if ~exist('file', 'var')
0018     disp('Usage: key = vb_mMD5(file)');
0019     return;
0020 end
0021 
0022 if exist(file, 'file') ~= 2
0023     error('Specified file is not found');
0024 end
0025 
0026 %
0027 % --- Main Procedure
0028 %
0029 digest = vb_CalcMD5(file, 'File');

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005