GetMD5

Get MD5 of files or arrays as fast C-Mex

이 제출물을 팔로우합니다

MD5 hash of files, strings and arrays (RFC 1321)
Hash = GetMD5(Data, Mode, Format)
INPUT:
Data: File name or array.
Mode: CHAR to declare the type of the 1st input.
'File': Data is a file name as CHAR.
'8Bit': If Data is a CHAR array, only the 8 bit ASCII part is used.
'Binary': The MD5 sum is obtained for the contents of Data.
This works for numerical, CHAR and LOGICAL arrays.
'Array': Include the class and dimensions of Data in the MD5
sum. This can be applied for (nested) structs, cells
and sparse arrays also.
Format: CHAR, format of the output: hex, HEX, double, uint8, base64

OUTPUT:
Hash: A 128 bit number is replied in the specified format.

This function is at least 2 times faster than the corresponding Java method.
For shorter arrays this C-Mex implementation is much faster, see the output
of the included unit test function.
The function DataHash can reply SHA hashes also, but it is remarkably
slower due to the overhead of calling Java. For nested structs this C-Mex
can be 100 times faster. See:
http://www.mathworks.com/matlabcentral/fileexchange/31272-datahash
The C-function must be compiled before using: Call the M-function without
inputs. If you do not have a C-compiler, pre-compiled files can be
downloaded: http://n-simon.de/mex

인용 양식

Jan (2026). GetMD5 (https://kr.mathworks.com/matlabcentral/fileexchange/25921-getmd5), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 받은 파일: MD5 in MATLAB

도움 준 파일: bimac/md5sum, JavaMD5, DataHash

일반 정보

MATLAB 릴리스 호환 정보

  • R13SP1 이상 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
2.1.1

M-file accepts inputs now to care about users, who do not follow the install instructions.

2.1

String type is handled.

2.0.0.0

Compilation failed, when _LITTE_ENDIAN was undefined.
Improved speed, the class and size of arrays can be considered, cell and struct arrays accepted. Now arrays and files > 2.1GB are processed.
Fixed problem with compiling under MacOS X.

1.1.0.0

UINT32 has 4 bytes on 64-bit systems now. Thanks to Sebastiaan (34534)!

1.0.0.0