view m-toolbox/classes/+utils/@prog/funchash.m @ 52:daf4eab1a51e
database-connection-manager tip
Fix. Default password should be [] not an empty string
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Wed, 07 Dec 2011 17:29:47 +0100 (2011-12-07)
parents
f0afece42f48
children
line source
+ − function h = funchash(fcnname)
+ −
+ − % FUNCHASH compute MD5 hash of a MATLAB m-file.
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % DESCRIPTION: FUNCHASH compute MD5 hash of a MATLAB m-file.
+ − %
+ − % CALL: h = funchash(mfile_name)
+ − %
+ − % INPUTS: fcnname - The name of an m-file.
+ − %
+ − % The first file found by 'which' is hashed.
+ − %
+ − % OUTPUTS: h - the hash string
+ − %
+ − % PARAMETERS: None.
+ − %
+ − % EXAMPLES:
+ − %
+ − % >> h = funchash('ao');
+ − %
+ − % VERSION: $Id: funchash.m,v 1.1 2008/06/18 13:35:11 hewitson Exp $
+ − %
+ − % HISTORY: 21-11-07 M Hewitson
+ − % Creation.
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ −
+ − % Get filename
+ − s = which(fcnname);
+ −
+ − % Read in file
+ − mfile = textread(s,'%s','delimiter','\n','whitespace','');
+ −
+ − % hash this
+ − h = ltpda_hash(char(mfile), 'MD5');
+ −