String mode:        @MD5[s[a|8],string[,start[,length]]]

File mode:        @MD5[[f,]filename[,start[,length]]]

Binary mode:        @MD5[[b,]handle[,start[,length]]]


Returns the 32 hexadecimal digit MD5 hash of the characters in string, the contents of the file filename, or the contents of the binary buffer.


If the first parameter is s for a Unicode UTF16 string, sa for an ASCII string, or s8 for a UTF8 string, any leading or trailing whitespace characters in string are included.


Filename may be specified with or without an optional f. @MD5 returns -1 if the file does not exist, or it cannot be read.

If the first parameter is b for a binary buffer, handle is the handle returned by @BALLOC.


The optional start parameter specifies the starting position in the binary buffer or file (in bytes, defaulting to 0).


The optional length parameter specifies the length of the buffer to hash (in bytes, defaulting to 0).


Since Take Command handles all internal strings as Unicode, @MD5 will return different results for a string and the identical string in an ASCII file.


See also: @SHA256, @SHA384, @SHA512, and @CRC32.




echo %@md5[s,this is a string]