- Category:
- Other systems
- Tags:
-
- File Size:
- 6kb
- Update:
- 2017-12-23
- Downloads:
- 0 Times
- Uploaded by:
- long
Description: Official hash encryption algorithm
% EXAMPLES:
% % Default: MD5, hex:
% DataHash([]) % 5b302b7b2099a97ba2a276640a192485
% % MD5, Base64:
% Opt = struct('Format', 'base64', 'Method', 'MD5');
% DataHash(int32(1:10), Opt) % +tJN9yeF89h3jOFNN55XLg
% % SHA-1, Base64:
% S.a = uint8([]);
% S.b = {{1:10}, struct('q', uint64(415))};
% Opt.Method = 'SHA-1';
% Opt.Format = 'HEX';
% DataHash(S, Opt) % 18672BE876463B25214CA9241B3C79CC926F3093
% % SHA-1 of binary values:
% Opt = struct('Method', 'SHA-1', 'Input', 'bin');
% DataHash(1:8, Opt) % 826cf9d3a5d74bbe415e97d4cecf03f445f69225
% % SHA-256, consider ASCII part only (Matlab's CHAR has 16 bits!):
% Opt.Method = 'SHA-256';
% Opt.Input = 'ascii';
% DataHash('abc', Opt)
% % ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
% % Or equivalently:
% Opt.Input = 'bin';
% DataHash(uint8('abc'), Opt)
To Search:
File list (Check if you may need any files):
Filename | Size | Date |
---|
DataHash.m | 19187 | 2016-06-18 |