ComputeNonCryptHash

Formatted documentation for the ComputeNonCryptHash function.

Compute a non-cryptographic hash

Contents

Description

This function is intended to be fast, but without requiring a Java or mex implementation to do the actual hashing. It was not checked for any security flaws and is therefore probably vulnerable to most attacks.
Non-cryptographic hashes should only be used as a checksum. Don't use this to do things like storing passwords.

Syntax

hash=ComputeNonCryptHash(data)
hash=ComputeNonCryptHash(___,HashLength)
hash=ComputeNonCryptHash(___,VersionFlag)
hash=ComputeNonCryptHash(___,options)
hash=ComputeNonCryptHash(___,Name,Value)

Output arguments

hash The hash in an upper case hexadecimal char vector of size 1x(HashLength/4).

Input arguments

data The data to be hashed. Most common data types are allowed: uint*, int*, char, cell, struct, double, or single (string is cast to char). The contents of the nested data types (i.e. cell and struct) must also be one of the mentioned data types.
HashLength This paramater can be entered separately to provide backwards syntax compatibility. See the Name,Value pairs section for a description.
VersionFlag This paramater can be entered separately to provide backwards syntax compatibility. See the Name,Value pairs section for a description.
Name,Value The settings below can be entered with a Name,Value syntax.
options Instead of the Name,Value, parameters can also be entered in a struct. Missing fields will be set to the default values.

Name,Value pairs

HashLength The length of the hash (the number of bits). This value must be a multiple of 16. Depending on your input 64 bits might have some collisions, but 64 bits and higher should be safe. Higher values will progressively worsen performance.
default=256;
VersionFlag Either '-v1', '-v2'. This is provided for backwards compatibility. Version 1 of this function has many hash collisions for scalar doubles and attempts to cast strings to chars, instead of casting to a cell array of chars. Version 2 also decodes the UTF-8 chars from Octave and re-encodes them with UTF-16. That way the output is stable for the Unicode code points.
default='-v2';
print_to_con A logical that controls whether warnings and other output will be printed to the command window. Errors can't be turned off.
default=true; if print_to_fid, print_to_obj, or print_to_fcn is specified then default=false;
print_to_fid The file identifier where console output will be printed. Errors and warnings will be printed including the call stack. You can provide the fid for the command window (fid=1) to print warnings as text. Errors will be printed to the specified file before being actually thrown.
If print_to_fid, print_to_obj, and print_to_fcn are all empty, this will have the effect of suppressing every output except errors.
This parameter does not affect warnings or errors during input parsing.
Array inputs are allowed.
default=[];
print_to_obj The handle to an object with a String property, e.g. an edit field in a GUI where console output will be printed. Messages with newline characters (ignoring trailing newlines) will be returned as a cell array. This includes warnings and errors, which will be printed without the call stack. Errors will be written to the object before the error is actually thrown.
If print_to_fid, print_to_obj, and print_to_fcn are all empty, this will have the effect of suppressing every output except errors.
This parameter does not affect warnings or errors during input parsing.
Array inputs are allowed.
default=[];
print_to_fcn A struct with a function handle, anonymous function or inline function in the 'h' field and optionally additional data in the 'data' field. The function should accept three inputs: a char array (either 'warning' or 'error'), a struct with the message, id, and stack, and the optional additional data. The function(s) will be run before the error is actually thrown.
If print_to_fid, print_to_obj, and print_to_fcn are all empty, this will have the effect of suppressing every output except errors.
This parameter does not affect warnings or errors during input parsing.
Array inputs are allowed.
default=[];

Compatibility, version info, and licence

Compatibility considerations:

Test suite result Windows XP/7/10 Ubuntu 20.04 LTS MacOS 10.15 Catalina
Matlab R2021a W10 : Pass
Matlab R2020b W10 : Pass
Matlab R2020a W10 : Pass
Matlab R2018a W10 : Pass Pass
Matlab R2015a W10 : Pass Pass
Matlab R2013b W10 : Pass
Matlab R2012b W10 : Pass
Matlab R2011a W10 : Pass Pass
Matlab R2010b Pass
Matlab R2010a W7 : Partial: int64 hash mismatch
Matlab R2007b W10 : Partial: int64 hash mismatch
Matlab 7.1 (R14SP3) XP : Partial: int64 hash mismatch
Matlab 6.5 (R13) W10 : Partial: int64 hash mismatch
Octave 6.2.0 W10 : Pass
Octave 5.2.0 W10 : Pass Pass
Octave 4.4.1 W10 : Pass Pass

Version: 2.1.0
Date:    2021-05-18
Author:  H.J. Wisselink
Licence: CC by-nc-sa 4.0 ( https://creativecommons.org/licenses/by-nc-sa/4.0 )
Email = 'h_j_wisselink*alumnus_utwente_nl';
Real_email = regexprep(Email,{'*','_'},{'@','.'})

Performance

The benchmarking function used to generate the results below can be found here.
The test results shown in the tables below are normalized to the results of the newest Matlab release on Windows, since the performace is strongly dependent on the specific computer running the test. To allow absolute comparisons as well the results in that cell are shown in seconds.

Note that every result apart from those under Windows 10 was obtained in a VM, so the performance is likely an underestimation of the true performance.

Test 1: 10000 English words
Test 2: 1 to 1e4 (in char format)
Test 3: 1 to 1e4 (in double format)
Test 4: 1 to 1e4 (in uint16 format)
Test 5: 25 images
Test suite result Windows XP/7/10 Ubuntu 20.04 LTS MacOS 10.15 Catalina
Matlab R2021a (W10)
1.488 s
1.445 s
1.561 s
1.338 s
1.358 s
Matlab R2020b (W10)
103 %
104 %
101 %
104 %
88 %
Matlab R2020a (W10)
111 %
112 %
108 %
111 %
87 %
Matlab R2018a (W10)
109 %
112 %
106 %
111 %
78 %
115 %
116 %
112 %
116 %
111 %
Matlab R2015a (W10)
475 %
489 %
458 %
499 %
100 %
489 %
501 %
473 %
506 %
149 %
Matlab R2013b (W10)
433 %
444 %
417 %
454 %
116 %
Matlab R2012b (W10)
577 %
593 %
555 %
618 %
113 %
Matlab R2011a (W10)
453 %
471 %
433 %
466 %
146 %
452 %
463 %
433 %
472 %
149 %
Matlab R2010b 425 %
438 %
411 %
447 %
144 %
Matlab R2010a (W7)
430 %
443 %
413 %
452 %
235 %
Matlab R2007b (W10)
365 %
375 %
345 %
376 %
188 %
Matlab 7.1 (R14SP3) (XP)
264 %
265 %
238 %
266 %
417 %
Matlab 6.5 (R13) (W10)
328 %
336 %
326 %
342 %
1 187 %
Octave 6.2.0 (W10)
1 404 %
1 450 %
1 289 %
1 327 %
172 %
Octave 5.2.0 (W10)
1 208 %
1 250 %
1 071 %
997 %
212 %
907 %
929 %
801 %
748 %
162 %
Octave 4.4.1 (W10)
1 207 %
1 247 %
1 070 %
995 %
162 %
2 047 %
2 097 %
1 801 %
1 677 %
255 %

Test suite

This tester is included so you can test if your own modifications would introduce any bugs. These tests form the basis for the compatibility table above.

To save space, the tester function below was minified. The full tester function (including all comments) can be found here.

% Test if the syntax checks work and if the output is stable
%
% Pass:    passes all tests
% Partial: int64 and uint64 might fail pre-R2010b
% Fail:    fails any test
%
function v000=aaa___ComputeNonCryptHash___test(varargin),v000='pass';try test_syntax;catch,if ...
nargout>0,v000='fail';return,else,error('syntax test failed');end,end,clc,persistent v001,if ...
isempty(v001),v001=ifversion('>=','R2010b','Octave','>',0);end,[v002,v003]=get_test_cases;for ...
v004=1:size(v003{1},2),v005=numel(v003{1}{1,v004})*4;for v006=1:numel(v002),for v007=1:2,v008=...
ComputeNonCryptHash(v002{v006},v005,sprintf('-v%d',v007));if ~strcmp(v003{v007}{v006,v004},...
v008),if (v006==8 || v006==9) && v007>1 && ~v001,if nargout>0,v000=...
'partial: int64 hash mismatch';else,warning('hash did not match: k=%d,n=%d (v=%d, H=%s)\n',v004,...
v006,v007,v008),end,else,if nargout>0,v000='fail';return,else,...
error('hash did not match: k=%d,n=%d (v=%d)\n',v004,v006,v007),end,end,end,end,end,end,...
disp('test finished successfully'),if nargout==0,clear,end,end
function [v000,v001,v002]=ComputeNonCryptHash_parse_inputs(varargin),v000=true;v002=struct;
persistent v003,if isempty(v003),v003=struct;v003.HashLength=256;v003.Version=2;
v003.VersionFlag='-v2';v003.SkipInputParse=false;v003.isSaltCall=false;v004=struct;
v003.print_to_con=true;v004.print_to_con=v003.print_to_con;v003.print_to_fid=[];
v004.print_to_fid=v003.print_to_fid;v003.print_to_obj=[];v004.print_to_obj=v003.print_to_obj;
v003.print_to_fcn=[];v004.print_to_fcn=v003.print_to_fcn;v003.print_2__default_options=v004;
v003.print_2__options=validate_print_to__options(v004);end,if nargin==0,v001=...
ComputeNonCryptHash_DefaultsByVersion(v003);return,end,if nargin==1,switch class(varargin{1}),...
case {'char','string'},v001=AddMissing(v003,struct('VersionFlag',char(varargin{1})));case ...
'struct',v001=AddMissing(v003,varargin{1});otherwise,v001=AddMissing(v003,struct('HashLength',...
varargin{1}));end,[v001,v002,v000]=ComputeNonCryptHash_parse_inputs__ValidateInputs(v001);if ...
v000,v001=ComputeNonCryptHash_DefaultsByVersion(v001);end,return,end,try [v001,v002,v005]=...
ComputeNonCryptHash_parse_inputs__UnwindToStruct( struct,v002,~v000,varargin{:});v000=~v005;
catch,v002.identifier='HJW:ComputeNonCryptHash:InputFail';v002.message=...
'Input parsing failed. Maybe a parameter has been entered twice.';v000=false;end,if ~v000,...
return,else ,v001=AddMissing(v003,v001);end,[v001,v002,v000]=...
ComputeNonCryptHash_parse_inputs__ValidateInputs(v001);if v000,v001=...
ComputeNonCryptHash_DefaultsByVersion(v001);end,end
function v000=unicode_to_char(v001,v002),persistent v003,if isempty(v003),v003 = ...
exist('OCTAVE_VERSION', 'builtin') ~= 0;end,if nargin==1,v002=~v003;end,if v002,if ...
all(v001<65536),v000=uint16(v001);v000=reshape(v000,1,numel(v000));else,[v004,v005,v006]=...
unique(v001);v000=cell(1,numel(v001));for v007=1:numel(v004),v008=unicode_to_UTF16(v004(v007));
v008=uint16(v008);v000(v006==v007)={v008};end,v000=cell2mat(v000);end,if ~v003,v000=char(v000);
end,else,if all(v001<128),v000=char(v001);v000=reshape(v000,1,numel(v000));else,[v004,v005,...
v006]=unique(v001);v000=cell(1,numel(v001));for v007=1:numel(v004),v008=...
unicode_to_UTF8(v004(v007));v008=uint8(v008);v000(v006==v007)={v008};end,v000=cell2mat(v000);
v000=char(v000);end,end,end
function v000=ifversion(v001,v002,v003,v004,v005),persistent v006 v007 v008,if isempty(v006),...
v008=exist('OCTAVE_VERSION', 'builtin');v006=version;v009=strfind(v006,'.');if numel(v009)~=1,...
v006(v009(2):end)='';v009=v009(1);end,v006=[str2double(v006(1:(v009-1))) ...
str2double(v006((v009+1):end))];v006=v006(1)+v006(2)/100;v006=round(100*v006);v007={ 'R13' 605;
'R13SP1' 605;'R13SP2' 605;'R14' 700;'R14SP1' 700;'R14SP2' 700;'R14SP3' 701;'R2006a' 702;
'R2006b' 703;'R2007a' 704;'R2007b' 705;'R2008a' 706;'R2008b' 707;'R2009a' 708;'R2009b' 709;
'R2010a' 710;'R2010b' 711;'R2011a' 712;'R2011b' 713;'R2012a' 714;'R2012b' 800;'R2013a' 801;
'R2013b' 802;'R2014a' 803;'R2014b' 804;'R2015a' 805;'R2015b' 806;'R2016a' 900;'R2016b' 901;
'R2017a' 902;'R2017b' 903;'R2018a' 904;'R2018b' 905;'R2019a' 906;'R2019b' 907;'R2020a' 908;
'R2020b' 909;'R2021a' 910};end,if v008,if nargin==2,warning('HJW:ifversion:NoOctaveTest',...
['No version test for Octave was provided.',char(10),...
'This function might return an unexpected outcome.']),if isnumeric(v002),v010=...
0.1*v002+0.9*fix(v002);v010=round(100*v010);else,v011=ismember(v007(:,1),v002);if sum(v011)~=1,...
warning('HJW:ifversion:NotInDict','The requested version is not in the hard-coded list.'),v000=...
NaN;return,else,v010=v007{v011,2};end,end,elseif nargin==4,[v001,v010]=deal(v003,v004);v010=...
0.1*v010+0.9*fix(v010);v010=round(100*v010);else,[v001,v010]=deal(v004,v005);v010=...
0.1*v010+0.9*fix(v010);v010=round(100*v010);end,else,if isnumeric(v002),v010=...
0.1*v002+0.9*fix(v002);v010=round(100*v010);else,v011=ismember(v007(:,1),v002);if sum(v011)~=1,...
warning('HJW:ifversion:NotInDict','The requested version is not in the hard-coded list.'),v000=...
NaN;return,else,v010=v007{v011,2};end,end,end,switch v001,case '==', v000= v006 == v010;case ...
'<' , v000= v006 < v010;case '<=', v000= v006 <= v010;case '>' , v000= v006 > v010;case '>=', ...
v000= v006 >= v010;end,end
function [v000,v001,v002,v003]=parse_warning_error_redirect_inputs(varargin),if nargin==1,if ...
isa(varargin{1},'struct') || isa(varargin{1},'MException'),v004=varargin{1};try v002=v004.stack;
v003=get_trace(0,v002);catch,[v003,v002]=get_trace(3);end,v000=v004.identifier;v001=...
v004.message;v005=...
'Error using <a href="matlab:matlab.internal.language.introspective.errorDocCallback(';if ...
isa(v004,'struct') && numel(v001)>numel(v005) && strcmp(v005,v001(1:numel(v005))),...
v001(1:find(v001==10,1))='';end,else,[v003,v002]=get_trace(3);[v000,v001]=deal('',varargin{1});
end,else,[v003,v002]=get_trace(3);if ~isempty(strfind(varargin{1},'%')),v000='';v006=...
varargin(2:end);v001=sprintf(varargin{1},v006{:});else,v000=varargin{1};v001=varargin{2};if ...
nargin>3,v006=varargin(3:end);v001=sprintf(v001,v006{:});end,end,end,end
function v000=parse_warning_error_redirect_options(v000),if ~isfield(v000,'boolean'),...
v000.boolean=struct;end,if ~isfield(v000.boolean,'con') || isempty(v000.boolean.con),...
v000.boolean.con=false;end,if ~isfield(v000.boolean,'fid') || isempty(v000.boolean.fid),...
v000.boolean.fid=isfield(v000,'fid');end,if ~isfield(v000.boolean,'obj') || ...
isempty(v000.boolean.obj),v000.boolean.obj=isfield(v000,'obj');end,if ~isfield(v000.boolean,...
'fcn') || isempty(v000.boolean.fcn),v000.boolean.fcn=isfield(v000,'fcn');end,end
function v000=PatternReplace(v001,v002,v003),v000=v001(:)';if numel(v002)==0,v004=...
false(size(v001));elseif numel(v003)>numel(v002),error('not implemented (padding required)'),...
else,v004=true(size(v001));for v005=1:numel(v002),v006=find(v001==v002(v005));v006=v006-v005+1;
v006(v006<1)=[];v007=false(size(v004));v007(v006)=true;v004= v004 & v007;if ~any(v004),break,...
end,end,end,v006=find(v004);if ~isempty(v006),for v005=1:numel(v003),v000(v006+v005-1)=...
v003(v005);end,if numel(v003)==0,v005=0;end,if numel(v002)>v005,v006=v006(:);v008=...
(v005+1):numel(v002);v009=bsxfun_plus(v006,v008-1);v000(v009(:))=[];end,end,end
function [v000,v001]=test_if_scalar_logical(v001),persistent v002,if isempty(v002),v002={true,...
false;1,0;'on','off';'enable','disable';'enabled','disabled'};try v002(end+1,:)=...
eval('{"on","off"}');catch,end,end,v000=true;try if isa(v001,'char') || isa(v001,'string'),try ...
v001=lower(v001);catch,end,end,for v003=1:size(v002,1),for v004=1:2,if isequal(v001,v002{v003,...
v004}),v001=v002{1,v004};return,end,end,end,if isa(v001,'matlab.lang.OnOffSwitchState'),v001=...
logical(v001);return,end,catch,end,v000=false;end
function [v001,v004]=get_test_cases,v000=...
['6A9A0BB37950EFC198B354CBFB2191E7095C3309A4D233163E62801CDF5A2976',...
'1124707FC61D818D0DEC78B6784F37AF57144039C2AC5007DBFBA7E6A389D54F',...
'23BAACA122C3CA3C35D4156FE0DB8BEE8BAE40F2A1B4C1AE37B17CA1CCD08A13',...
'88FBB55BDA4CE3D6B270EAE270637BA522D5E0F2330BF47EE72A3C406E16BF08',...
'9B2C731EFB8F2F2D2FEA27E1DD29E52C72803011C73C9285ED076112A4A2B042',...
'866C8A112B6454F9B0FAF5C953E46744E149772931881F304BBE1EB61A972EA5',...
'D63997E8BC1596FFF592935A37157DD0AA1D4A0BD0AC7FD8DD9C21A7A48C02BC',...
'B95E432987FA74501570F808D010DFC9E86B885A1AED6CB65F0D9A146BB44874',...
'3C670244B256AFE6AAC40178261B71422D5BC43A56F5F285F2D00B8EF0F6D2BC',...
'D73C5364EE0D722DFE1A66FC777068D0346B8F8CF1A13CA8DA013657AA2C7E27'];v001{1}=hex2im(v000);
v001{2}=uint8(1);v001{3}=int8(-50);v001{4}=uint16(2000);v001{5}=int16(-50);v001{6}=...
uint32(54321);v001{7}=int32(-50);v001{8}=uint64(inf);v001{9}=int64(-50);v001{10}=[v000;v000;
v000(end:-1:1)];v001{11}=-50;v001{12}=single(-12345678);v001{13}=single( 12345678);v001{14}=...
(-12345678);v001{15}=( 12345678);v001{16}={struct('a',1,'b',v000),{''}};v001{17}={struct('a',1,...
'b',v000),{[]}};v001{18}=[1 2];v002={ '342E',...
'C7AB19F74F03A4B65141A30699AA30C60D2D0B958B737E4F69DFBC09C9CA3293';'FC94',...
'274FBFC0CF0014586EF8DA79F52FAB2AF691B933985B167ACFDE8211743003AC';'149D',...
'089314ACFE0F41F05A96100746EB57DFC42F08CEB447A5C1190CC54FF98D2B41';'C485',...
'B20635EA67FECC19E3B1B1C858FDCF3A1AE360F3F4BB6D319E8504642EF0CE81';'E362',...
'EBDB73016028CAF6B31BED64D32FF18390A5DA6627F1C1AFC3055E4D94261A07';'7FB2',...
'8BEBA9BDC403634606EC2720F9E49B7B55857CDDF91469451802802DA8644836';'E145',...
'1F242D0088DB24E0266DDE69D8B685D9513CDA23D5CCBA1B88F33324667F3273';'F0BA',...
'6D6ECD144DFA00CE41F55D6FE16667092FEB6B91D6211BC3A946E8943F726415';'FA1E',...
'F19B1B653844968B6AE0BECF36738B3E07D7F57133F52D5DFB380AA0858FEBCF';'A31D',...
'5BE85BAE14C0E30A1D58AB612D90644529CACF75B3C8E41CF80997CD9F3154EC';'8AF3',...
'1F3C099580D4CA3FA755764E9D8A42D75DF0FE3439A4AF63F71A77464065C095';'83A5',...
'C9136FE84F5325C99ACBD883FB140906C01D670C91A9ADAF28829F872F8F9460';'6D38',...
'4F78DF4277286136D10EDC8A70ABD8E0AE3BEBAEDC86ED7CCBEB6D971C5CFB3E';'9D74',...
'FC630EAE663B4F68D8C00B911D3BD1F7F11267ADFE5549288E4531239A9D08ED';'29DF',...
'C2400EAE72CCA7C6A8FC546DEF0DE612A165BF92B776707357A0FD0FC051BF1A';'2B5E',...
'61F63070C29CBDF584437FBD531C676D638C7D1A2CD88EA6F347205825541329';'B437',...
'E2EFDB2BE3E5548125F98EABE3733E09973EBC81F81E852C8B0487224AFBD634';'3004',...
'EB963790C114302935F1A4EFEA082331CB86F5BEEA229A31B90D28F1C41DED3A'};v003={ 'F466',...
'CDC5D51DC2D7973792646DD13AE5C5A8EDB498176EEB490FC50C03C39B487023';'8648',...
'FD172B80031A7B94DA8EF106C3288ED55838AD27229C2959C4263D9B11099215';'1896',...
'89496CDEEE67208B8947362288811421167AA82709A9B52F89A4D40E498C5934';'97D2',...
'679DDB88F642FD31B8F24694EA5F251AEE6A70F929DD8AC118A4C3039017C036';'8E07',...
'42296DDBEF4351D7966B79D5D88D1EE88E92AAA7CF1B068185DBD40EF4D93040';'FA97',...
'0000B11AFBB435374EF9143A4A1FC600089AAFD956A8E03952633111FB606EE9';'F54A',...
'7E53A713FA36FB424DF3530B2429DD119F6D8DEACA6B8AC13462C3035F0DB839';'ACAE',...
'631910E51ECAF1CF9A4BA12F97342902C43CF21B0927C9B7DEC52436FC76127E';'18B1',...
'425380E7A9A6E43A405C8CCDE107DE96D561D97782A4DF01BE1CD6654F44AB7D';'2256',...
'4F6C5970DCD461A86CC5E25B79952C772C9744A16F893FBA03E8169478B5A667';'4403',...
'5637000000000000B664B14404228D9278BD269627D879CEAE598C3C329E3CE5';'B5D7',...
'338901AA8A470000A68193CD74E87A07777547393F2D6326AA9009A4A97EE5D4';'7697',...
'4EC3955211C40000A68193CD6728F1D17775473917446326AA9009A44F1B3143';'624B',...
'6BB6141FDB370000E80EB144E8C86FD9AC7784ED27D8227DAA9009A4A97E346D';'4389',...
'76F0A7C762B40000E80EB144A5AF8D92AC7784EDFFF0227DAA9009A44F1B7FDD';'6F9B',...
'ED220A20B06AD5302D9E9DFBDC616C02A2E6E3F80D526C094EE18DF80643998F';'5C54',...
'22164F2E69A215BFCBA3877670FD0325386D0C43414E584C95A9C740BFCB182C';'1FAF',...
'FC6F39DE00000000000000000000000034A08FD96F571B843D8052CDB59D54FD'};v004={v002,v003};end
function v000=cast_to_uint16_vector__string(v000,v001),if v001.string_to_cellstr,v000=...
cellstr(v000);v000=cast_to_uint16_vector__cell(v000,v001);else,v000=char(v000);v000=...
cast_to_uint16_vector__char(v000,v001);end,end
function v000=cast_to_uint16_vector__struct(v000,v001),v002=size(v000).';v000=v000(:);v003=...
fieldnames(v000);v004=cell(2,numel(v003));for v005=1:numel(v003),v004{1,v005}=v003{v005};v004{2,...
v005}={v000.(v003{v005})};end,v000=cast_to_uint16_vector__cell(v004,v001);v000=[v000;
uint16(mod(v002,2^16))];end
function v000=char2cellstr(v001,v002),v003=isa(v001,'char');v001=int32(v001);if nargin<2,if ...
any(v001==13),v001=PatternReplace(v001,int32([13 10]),int32(-10));v001(v001==13)=-10;end,...
v001(v001==10)=-10;else,for v004=1:numel(v002),v001=PatternReplace(v001,int32(v002{v004}),...
int32(-10));end,end,v005=[0 find(v001==-10) numel(v001)+1];v000=cell(numel(v005)-1,1);for v004=...
1:numel(v000),v006=(v005(v004 )+1);v007=(v005(v004+1)-1);v000{v004}=v001(v006:v007);end,if v003,...
for v004=1:numel(v000),v000{v004}= char(v000{v004});end,else,for v004=1:numel(v000),v000{v004}=...
uint32(v000{v004});end,end,end
function v000=circshift_by_col(v000),persistent v001,v002=size(v000);if isempty(v001) || ...
any(size(v001)<v002) || isempty(v001{v002(1),v002(2)}),[v003,v004]=meshgrid(1:size(v000,2),...
1:size(v000,1));v005=mod(v003+v004-2,size(v000,1))+1;v006=sub2ind(size(v000),v005,v003);if ...
prod(v002)<=1000,v001{v002(1),v002(2)}=v006;end,else,v006=v001{v002(1),v002(2)};end,v000=...
v000(v006);end
function v000=ComputeNonCryptHash_dec2hex(v001),persistent v002,if isempty(v002),v002=...
upper(dec2hex(0:(-1+2^16),4));end,v001=double(v001)+1;v000=v002(v001,:);end
function v000=ComputeNonCryptHash_add_salt(v000,v001),v002=16*numel(v000);v003=v001;
v003.Version=1; v003.HashLength=v002;v003.SkipInputParse=1; v003.isSaltCall=1;v004=...
ComputeNonCryptHash(v000,v003);v004=ComputeNonCryptHash_shuffle_uint16_inv(v004);if ...
v001.Version>1,v004=v004(end:-1:1);end,v000=mod(double(v000).*double(v004),1+2^16);v000=...
uint16(v000);end
function v000=ComputeNonCryptHash(v001,varargin),if nargin<1,...
error('HJW:ComputeNonCryptHash:InputIncorrect','At least 1 input required.'),end,if nargin==2 ...
&& isa(varargin{1},'struct') && varargin{1}.SkipInputParse,v002=varargin{1};else,[v003,v002,...
v004]=ComputeNonCryptHash_parse_inputs(varargin{:});if ~v003,rethrow(v004),end,end,...
v002.print_to=v002.print_2__options;v005=v002.HashLength;v006=v002.Version;try v004=[];v001=...
cast_to_uint16_vector(v001,v002);catch v004;if isempty(v004),v004=lasterror;end,if ...
strcmp(v004.identifier,'MATLAB:nomem'),error_(v002.print_to,v004),else,if isfield(v002,'debug') ...
&& v002.debug,v007=sprintf('\n[original error: %s %s]',v004.identifier,v004.message);else,v007=...
'';end,error_(v002.print_to,'HJW:ComputeNonCryptHash:UnwindFailed',...
['The nested input contains an unsupported data type.' v007]),end,end,if mod(numel(v001),...
v005/16),v008=uint16(1:v005/16).'; v008(1:mod(numel(v001),v005/16))=[];v001=[v001;v008];end,if ...
v006==1,v001=ComputeNonCryptHash_shuffle_uint16(v001);v001=...
ComputeNonCryptHash_uint16_to_logical(v001);v001=xor(v001,reshape(v001,[],16).');else,v001=...
ComputeNonCryptHash_shuffle_uint16(v001);v001=ComputeNonCryptHash_uint16_to_logical(v001);v001=...
circshift_by_col(v001);end,v001=mod(sum(reshape(v001,v005,[]),2),2);v001=...
ComputeNonCryptHash_logical_to_uint16(v001);if v002.isSaltCall,v000=v001;return,end,v001=...
ComputeNonCryptHash_add_salt(v001,v002);v000=ComputeNonCryptHash_dec2hex(v001);v000=...
reshape(v000.',1,[]);end
function v000=ComputeNonCryptHash_logical_to_uint16(v000),if mod(numel(v000),16),...
v000(16*ceil(numel(v000)/16))=0;end,v001=uint16(2.^(15:-1:0))';v000=uint16(reshape(v000,16,[]));
try v000=v000.*v001;catch,v000=double(v000).*repmat(double(v001),[1 size(v000,2)]);v000=...
uint16(v000);end,v000=uint16(sum(v000,1)).';end
function v000=ComputeNonCryptHash_shuffle_uint16(v000),v001=65537;v002=479001600;v000 = ...
uint16(mod(double(v000) * v002 , v001));end
function v000=ComputeNonCryptHash_shuffle_uint16_inv(v000),v001=65537;v002=1919;v000=...
uint16(mod(double(v000) * v002,v001));end
function test_syntax,clc,v000=false;v001={@test01,@test02,@test03,@test04,@test05};for v002=...
1:numel(v001),v001{v002}=func2str(v001{v002});end,for v003=1:numel(v001),try [v004,v005]=...
eval(v001{v003});catch,break,end,if v004,fprintf('test %d succeded\n',v003),else,v006=...
v005.identifier;fprintf('test %d failed\n(id: %s)\n',v003,v006),v000=true;end,end,if v000,...
error('syntax test failed'),end,end
function v000=ComputeNonCryptHash_uint16_to_logical(v000),persistent v001,if isempty(v001),v001=...
dec2bin(0:(-1+2^16))=='1';v001=v001.';end,v000=double(v000)+1;v000=v001(:,v000);end
function [v000,v001]=test02,v000=true;try v001=[];ComputeNonCryptHash;v000=false;catch v001;if ...
isempty(v001),v001=lasterror;end,if ~strcmp(v001.identifier,...
'HJW:ComputeNonCryptHash:InputIncorrect'),v000=false;end,end,end
function [v000,v001]=test03,v000=true;try v001=[];v002='1';ComputeNonCryptHash(v002,8,'-v1');
v000=false;catch v001;if isempty(v001),v001=lasterror;end,if ~strcmp(v001.identifier,...
'HJW:ComputeNonCryptHash:InputIncorrect'),v000=false;end,end,end
function [v000,v001]=test04,v000=true;try v001=[];v002='1';ComputeNonCryptHash(v002,[16 16]);
v000=false;catch v001;if isempty(v001),v001=lasterror;end,if ~strcmp(v001.identifier,...
'HJW:ComputeNonCryptHash:InputIncorrect'),v000=false;end,end,end
function v000=cast_to_uint16_vector(v000,v001),if isa(v000,'uint16'),v002='uint16';v003=...
size(v000).';v000=reshape(v000,[],1);v000=[v000;uint16(v002.');uint16(mod(v003,2^16))];return,...
end,v000=cast_to_uint16_vector__cell({v000},v001);v000([end-1 end])=[];end
function v000=cast_to_uint16_vector__cell(v000,v001),v002=size(v000).';v000=v000(:);for v003=...
1:numel(v000),if numel(v000{v003})==0,v004=double(class(v000{v003})');v000{v003}=uint16([0;v004;
size(v000{v003})']);continue,end,switch class(v000{v003}),case {'double','single'},v000{v003}=...
cast_to_uint16_vector__floats(v000{v003});case 'logical',v000{v003}=...
cast_to_uint16_vector__logical(v000{v003});case {'uint8','uint16','uint32','uint64','int8',...
'int16','int32','int64'},v000{v003}=cast_to_uint16_vector__integer(v000{v003},v001);case 'char',...
v000{v003}=cast_to_uint16_vector__char(v000{v003},v001);case 'string',v000{v003}=...
cast_to_uint16_vector__string(v000{v003},v001);case 'cell',v000{v003}=...
cast_to_uint16_vector__cell(v000{v003},v001);case 'struct',v000{v003}=...
cast_to_uint16_vector__struct(v000{v003},v001);case {'gpuArray','tall'},v000{v003}=...
cast_to_uint16_vector__cell({gather(v000{v003})},v001);otherwise,error_(v001.print_to,...
'HJW:cast_to_uint16_vector:nosupport','Unsupported data type in nested variable'),end,end,v000=...
cell2mat(v000);v000=[v000;uint16(mod(v002,2^16))];end
function v000=cast_to_uint16_vector__floats(v000),v001=size(v000).';v002=class(v000);[v003,...
v004]=typecast_double_uint64(double(v000));v005=mod(v003,2^16);v003=v003-v005;v003=v003/2^16;
v004=v004.';v006 =mod(v003,2^16);v003=v003-v006; v003=v003/2^16;v006=v006.';v007 =mod(v003,...
2^16);v003=v003-v007; v003=v003/2^16;v007=v007.';v008 =mod(v003,2^16); v008=v008.';v000=[v008;
v007;v006;v004];v000=uint16(v000(:));v000=[v000;uint16(v002.');uint16(mod(v001,2^16))];end
function [v000,v001]=test01,v000=true;v002=@sum;try v001=[];ComputeNonCryptHash(v002);v000=...
false;catch v001;if isempty(v001),v001=lasterror;end,if ~strcmp(v001.identifier,...
'HJW:ComputeNonCryptHash:UnwindFailed'),v000=false;end,end,end
function [v000,v001]=test05,v000=true;try v001=[];v002='1';ComputeNonCryptHash(v002,0);v000=...
false;catch v001;if isempty(v001),v001=lasterror;end,if ~strcmp(v001.identifier,...
'HJW:ComputeNonCryptHash:InputIncorrect'),v000=false;end,end,end
function v000=bsxfun_plus(v001,v002),try v000=v001+v002;catch,try v000=bsxfun(@plus,v001,v002);
catch,v003=size(v001); v004=size(v002);v001=repmat(v001,max(1,v004./v003)); v002=repmat(v002,...
max(1,v003./v004));v000=v001+v002;end,end,end
function v000=AddMissing(v001,v000),v002=fieldnames(v001);v003=fieldnames(v000);for v004=...
find(~ismember(v002,v003)).',v005=v002{v004};v000.(v005)=v001.(v005);end,end
function v000=ComputeNonCryptHash_DefaultsByVersion(v000),if ~isfield(v000,...
're_encode_char_on_Octave'),v000.re_encode_char=v000.Version>=2;end,if ~isfield(v000,...
'string_to_cellstr'),v000.string_to_cellstr=v000.Version>=2;if ~isfield(v000,...
'cast_int64_double'),v000.cast_int64_double=v000.Version==1;end,end,end
function [v000,v001,v002]=ComputeNonCryptHash_parse_inputs__ValidateInputs(v000),v002=true;v001=...
struct;try v003=str2double(v000.VersionFlag(3:end));if isnan(v003) || round(v003)~=v003 || ...
v003>2,error('trigger');end,v000.Version=v003;catch,v001.identifier=...
'HJW:ComputeNonCryptHash:InputIncorrect';v001.message=...
'Version input incorrect. Must be ''-v1'', ''-v2''.';v002=false;return,end,v004=v000.HashLength;
if numel(v004)~=1 || ~isnumeric(v004) || mod(v004,16)~=0 || v004<16,v001.identifier=...
'HJW:ComputeNonCryptHash:InputIncorrect';v001.message=...
'Second input (hash length) must be a multiple of 16.';v002=false;return,end,for v005=...
fieldnames(v000.print_2__default_options),if ~isequal(v000.(v005{1}),...
v000.print_2__default_options.(v005{1})),[v006,v001]=validate_print_to__options(v000);if ...
isempty(v006),v001.identifier='HJW:ComputeNonCryptHash:PrintToIncorrect';v002=false;return,end,...
v000.print_2__options=v006;break,end,end,end
function [v000,v001,v002]=ComputeNonCryptHash_parse_inputs__UnwindToStruct(v000,v001,v002,...
varargin),if v002 || numel(varargin)==0,return,end,v003=varargin{1};if isa(v003,'struct'),v004=...
fieldnames(v000);v005=fieldnames(v003);v006=unique([v004;v005]);if numel(v004)+numel(v005) ~= ...
numel(v006),v002=true;return,end,v000=AddMissing(v000,v003);varargin(1)=[];elseif isa(v003,...
'char') || isa(v003,'string'),try if isa(v003,'string'),v003=char(v003);end,if strcmpi('-v',...
v003(1:2)),if isfield(v000,'VersionFlag'),error('trigger'),end,v000.VersionFlag=v003;
varargin(1)=[];else,if isfield(v000,v003),error('trigger'),end,v000.(v003)=varargin{2};
varargin(1:2)=[];end,catch,v002=true;return,end,else,if isfield(v000,'HashLength'),v002=true;
return,end,v000.HashLength=v003;varargin(1)=[];end,[v000,v001,v002]=...
ComputeNonCryptHash_parse_inputs__UnwindToStruct(v000,v001,v002,varargin{:});end
function error_(v001,varargin),persistent v000,if isempty(v000),v000=func2str(@error_);end,if ...
isempty(v001),v001=struct;end,v001=parse_warning_error_redirect_options(v001);[v002,v003,v004,...
v005]=parse_warning_error_redirect_inputs(varargin{:});v006=struct('identifier',v002,'message',...
v003,'stack',v004);if v001.boolean.obj,v007=v003;while v007(end)==10,v007(end)='';end,if ...
any(v007==10),v007=char2cellstr(['Error: ' v007]);else,v007=['Error: ' v007];end,for v008=...
v001.obj(:).',try set(v008,'String',v007);catch,end,end,end,if v001.boolean.fid,for v009=...
v001.fid(:).',try fprintf(v009,'Error: %s\n%s',v003,v005);catch,end,end,end,if v001.boolean.fcn,...
if ismember(v000,{v004.name}),error('prevent recursion'),end,for v010=v001.fcn(:).',if ...
isfield(v010,'data'),try feval(v010.h,'error',v006,v010.data);catch,end,else,try feval(v010.h,...
'error',v006);catch,end,end,end,end,rethrow(v006),end
function [v000,v001]=get_trace(v002,v001),if nargin==0,v002=1;end,if nargin<2, v001=dbstack;end,...
v001(1:v002)=[];if ~isfield(v001,'file'),for v003=1:numel(v001),v004=v001(v003).name;if ...
strcmp(v004(end),')'),v005=strfind(v004,'(');v006=v004( (v005(end)+1):(end-1) );v007=...
v004(1:(v005(end)-2));else,v007=v004;[v008,v006]=fileparts(v004);end,[v008,v001(v003).file]=...
fileparts(v007);v001(v003).name=v006;end,end,persistent v009,if isempty(v009),v009=...
exist('OCTAVE_VERSION','builtin');end,if v009,for v003=1:numel(v001),[v008,v001(v003).file]=...
fileparts(v001(v003).file);end,end,v010=v001;v011='>';v000=cell(1,numel(v010)-1);for v003=...
1:numel(v010),[v012,v010(v003).file,v013]=fileparts(v010(v003).file);if v003==numel(v010),...
v010(v003).file='';end,if strcmp(v010(v003).file,v010(v003).name),v010(v003).file='';end,if ...
~isempty(v010(v003).file),v010(v003).file=[v010(v003).file '>'];end,v000{v003}=...
sprintf('%c In %s%s (line %d)\n',v011,v010(v003).file,v010(v003).name,v010(v003).line);v011=' ';
end,v000=horzcat(v000{:});end
function v000=hex2im(v001),v002=hex2im_glyphs;v002{32}=ones(size(v002{48}));v000=...
logical(cell2mat(v002(double(v001))));end
function v000=hex2im_glyphs,v000=cell(1,70);v000{48}=[1,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,0,0,0,0,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,...
1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,...
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1;0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,...
1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,...
1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,...
0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1;1,1,1,1,1,1,1,1,1,1,1,1,1,...
1,1,1,1,1;1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];end
function v000=cast_to_uint16_vector__logical(v000),v001=size(v000).';v000=v000(:);if ...
mod(numel(v000),16),v000(16*ceil(numel(v000)/16))=0;end,v002=uint16(2.^(15:-1:0))';v000=...
uint16(reshape(v000,16,[]));try v000=v000.*v002;catch,v000=double(v000).*repmat(double(v002),[1 ...
size(v000,2)]);v000=uint16(v000);end,v000=uint16(sum(v000,1)).';v000=[v000;uint16(mod(v001,...
2^16))];end
function [v000,v001]=typecast_double_uint64(v002),[v003,v004]=log2(v002);v005 =...
-floor(sign(v002)/2-0.5);v006=v004+1022;v007=abs(v003)*2-1;v000=zeros(size(v002));v000=...
v000+(v005*2^63);v000=v000+(v006*2^52);v000=v000+(v007*2^52);v001=mod(v007*2^52,2^16);v008=...
isinf(v002);v000(v002==0)=0;v000(isnan(v002))=18444492273895866368;v000(v008 & v002>0)=...
9218868437227405312;v000(v008 & v002<0)=18442240474082181120;v001(v002==0)=0;v001(isnan(v002))=...
0;v001(v008)=0;end
function v000=unicode_to_UTF16(v001),if v001<65536,v000=v001;return,end,v002=double(v001)-65536;
v002=dec2bin(v002,20);v000=bin2dec(['110110' v002(1:10);'110111' v002(11:20)]).';end
function [v000,v001,v002]=UTF8_to_unicode_internal(v000,v003),v001='success';v002=...
struct('identifier','HJW:UTF8_to_unicode:notUTF8','message','Input is not UTF-8.');persistent ...
v004,if isempty(v004),v004 = exist('OCTAVE_VERSION', 'builtin') ~= 0;end,if any(v000>255),v001=...
'error';if v003,return,end,elseif all(v000<128),return,end,for v005=4:-1:2,v006=...
bin2dec([repmat('1',1,v005) repmat('0',1,8-v005)]);v007=v000>=v006 & v000<256;if any(v007),v007=...
find(v007);v007=v007(:).';if numel(v000)<(max(v007)+v005-1),v001='error';if v003,return,end,...
v007( (v007+v005-1)>numel(v000) )=[];end,if ~isempty(v007),v008=bsxfun_plus(v007 , ...
(0:(v005-1)).' );v008=v008.';v007=v000(v008);end,else,v007=[];end,v009=[repmat('1',1,v005-1) ...
repmat('10',1,v005)];v010=unique([1:(v005+1) 1:8:(8*v005) 2:8:(8*v005)]);if numel(v007)>0,v007=...
unique(v007,'rows');v011=mat2cell(v007,ones(size(v007,1),1),v005);for v012=1:numel(v011),v013=...
dec2bin(double(v011{v012}))';if ~strcmp(v009,v013(v010)),v001='error';if v003,return,end,...
continue,end,v013(v010)='';if ~v004,v014=uint32(bin2dec(v013 ));else,v014=...
uint32(bin2dec(v013.'));end,v000=PatternReplace(v000,v011{v012},v014);end,end,end,end
function v000=unicode_to_UTF8(v001),if v001<128,v000=v001;return,end,persistent v002,if ...
isempty(v002),v002=struct;v002.limits.lower=hex2dec({'0000','0080','0800', '10000'});
v002.limits.upper=hex2dec({'007F','07FF','FFFF','10FFFF'});v002.scheme{2}='110xxxxx10xxxxxx';
v002.scheme{2}=reshape(v002.scheme{2}.',8,2);v002.scheme{3}='1110xxxx10xxxxxx10xxxxxx';
v002.scheme{3}=reshape(v002.scheme{3}.',8,3);v002.scheme{4}='11110xxx10xxxxxx10xxxxxx10xxxxxx';
v002.scheme{4}=reshape(v002.scheme{4}.',8,4);for v003=2:4,v002.scheme_pos{v003}=...
find(v002.scheme{v003}=='x');v002.bits(v003)=numel(v002.scheme_pos{v003});end,end,v004=...
find(v002.limits.lower<=v001 & v001<=v002.limits.upper);v000=v002.scheme{v004};v005=...
v002.scheme_pos{v004};v003=dec2bin(v001,v002.bits(v004));v000(v005)=v003;v000=bin2dec(v000.').';
end
function [v000,v001,v002]=UTF8_to_unicode(v003,v004),if nargin<2,v004=[];end,v005= nargout==1 ;
v003=uint32(v003);[v002,v006,v007]=UTF8_to_unicode_internal(v003,v005);if strcmp(v006,...
'success'),v001=true;v000=v002;elseif strcmp(v006,'error'),v001=false;if v005,error_(v004,v007),...
end,v000=v003;end,end
function v000=cast_to_uint16_vector__integer(v000,v001),v002=size(v000).';v000=v000(:);
persistent v003,if isempty(v003),v003=ifversion('>=','R2010b','Octave','>',0);end,v004=...
class(v000);v005=~v001.cast_int64_double && v003 && v004(end)=='4';if ~v005,if ...
any(abs(double(v000(:)))>2^52),warning_(v001,'HJW:ComputeNonCryptHash:int64rounding',...
['int64 and uint64 will be rounded pre-R2010b, resulting in rounding.',char(10),...
'This will result in a hash that is different from newer releases.']),end,end,if v005,if ...
v004(1)~='u',v006=v000>0;v007=-int64(-inf);v008=uint64(v000+v007+1);v008(v006)=...
uint64(v000(v006))+uint64(v007)+1;v000=v008;end,elseif v004(1)~='u',v000=...
double(v000)-double(eval([v004 '(-inf)']));else,v000=double(v000);end,switch v004(end),case '8',...
if mod(numel(v000),2),v000(end+1)=0;end,v000=reshape(v000,[],2);v000=v000(:,1)*255+v000(:,2);
v000=uint16(v000);case '6',v000=uint16(v000);case '2',v009=floor(v000/2^16);v009=v009.';v010=...
mod(v000,2^16); v010=v010.';v000=[v009;v010];v000=uint16(v000(:));case '4',v011=v000;v012=...
mod(v011,2^16);v011=v011-v012;v011=v011/2^16;v012=v012.';v013=mod(v011,2^16);v011=v011-v013;
v011=v011/2^16;v013=v013.';v010=mod(v011,2^16);v011=v011-v010;v011=v011/2^16;v010=v010.';v009=...
mod(v011,2^16); v009=v009.';v000=[v009;v010;v013;v012];v000=uint16(v000(:));end,v000=[v000;
uint16(v004.');uint16(mod(v002,2^16))];end
function v000=cast_to_uint16_vector__char(v000,v001),persistent v002,if isempty(v002),v002 = ...
exist('OCTAVE_VERSION', 'builtin') ~= 0;end,if v002 && v001.re_encode_char,v003 = size(v000,1)==...
numel(v000);if v003,v000=v000.';end,v000=cellstr(v000);for v004=1:numel(v000),v000{v004}=...
unicode_to_char(UTF8_to_unicode(v000{v004},v001.print_to),true);end,v005=cellfun('length',v000);
v006=max(v005);for v004=find(v005<v006),v000{v004}( (numel(v000{v004})+1) : v006)=uint16(' ');
end,v000=cell2mat(v000);if v003,v000=v000.';end,end,v007=size(v000).';v000=v000(:);v000=...
uint16(v000);v000=[v000;uint16(mod(v007,2^16))];end
function [v000,v001]=validate_print_to__options(v002,v001),if nargin<2,v001=struct;end,if ...
~isfield(v002,'print_to_con'),v002.print_to_con=[];end,if ~isfield(v002,'print_to_fid'),...
v002.print_to_fid=[];end,if ~isfield(v002,'print_to_obj'),v002.print_to_obj=[];end,if ...
~isfield(v002,'print_to_fcn'),v002.print_to_fcn=[];end,v003=true;v000=struct;v004=...
v002.print_to_fid;if isempty(v004),v000.boolean.fid=false;else,v003=false;v000.boolean.fid=true;
v000.fid=v004;for v005=1:numel(v004),try v006=ftell(v004(v005));catch,v006=-1;end,if ...
v004(v005)~=1 && v006==-1,v001.message=['Invalid print_to_fid parameter:',char(10),...
'should be a valid file identifier or 1.'];v000=[];return,end,end,end,v004=v002.print_to_obj;if ...
isempty(v004),v000.boolean.obj=false;else,v003=false;v000.boolean.obj=true;v000.obj=v004;for ...
v005=1:numel(v004),try v007=get(v004(v005),'String' );set( v004(v005),'String','' );set( ...
v004(v005),'String',v007);catch,v001.message=['Invalid print_to_obj parameter:',char(10),...
'should be a handle to an object with a writeable String property.'];v000=[];return,end,end,end,...
v004=v002.print_to_fcn;if isempty(v004),v000.boolean.fcn=false;else,v003=false;try for v005=...
1:numel(v004),if ~ismember(class(v004(v005).h),{'function_handle','inline'}) || ...
numel(v004(v005).h)~=1,error('trigger error'),end,end,catch,v001.message=...
['Invalid print_to_fcn parameter:',char(10),...
'should be a struct with the h field containing a function handle,',char(10),...
'anonymous function or inline function.'];v000=[];return,end,end,v004=v002.print_to_con;if ...
isempty(v004),v000.boolean.con=v003;else,[v008,v000.boolean.con]=test_if_scalar_logical(v004);
if ~v008,v001.message=['Invalid print_to_con parameter:',char(10),...
'should be a scalar logical.'];v000=[];return,end,end,end
function warning_(v001,varargin),persistent v000,if isempty(v000),v000=func2str(@warning_);end,...
if isempty(v001),v001=struct;end,v001=parse_warning_error_redirect_options(v001);[v002,v003,...
v004,v005]=parse_warning_error_redirect_inputs(varargin{:});v006=struct('identifier',v002,...
'message',v003,'stack',v004);if v001.boolean.con,if ~isempty(v002),warning(v002,'%s',v003),else,...
warning(v003), end,else,if ~isempty(v002),lastwarn(v003,v002); else,lastwarn(v003),end,end,if ...
v001.boolean.obj,v007=v003;while v007(end)==10,v007(end)=[];end,if any(v007==10),v007=...
char2cellstr(['Warning: ' v007]);else,v007=['Warning: ' v007];end,set(v001.obj,'String',v007),...
for v008=v001.obj(:).',try set(v008,'String',v007);catch,end,end,end,if v001.boolean.fid || ...
v001.boolean.fcn,v009=2;[v005,v004]=get_trace(v009);end,if v001.boolean.fid,for v010=...
v001.fid(:).',try fprintf(v010,'Warning: %s\n%s',v003,v005);catch,end,end,end,if ...
v001.boolean.fcn,if ismember(v000,{v004.name}),error('prevent recursion'),end,for v011=...
v001.fcn(:).',if isfield(v011,'data'),try feval(v011.h,'warning',v006,v011.data);catch,end,else,...
try feval(v011.h,'warning',v006);catch,end,end,end,end,end