Please enable JavaScript to view this site.

CMDebug / TCC-RT Help v. 28

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

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

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

 

Returns the SHA-384 checksum 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. If the first argument is a b, the filename argument should be the handle returned by @BALLOC.

 

The first parameter determines whether the output is in upper or lower case:

 

s or f or blower case
S or F or Bupper case

 

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).

 

Example:

 

echo %@sha384[c:\windows\notepad.exe]

04BA669372BD3CBC40CAA9E44DE7C2760DBC27D68A79F7B0DC24048D6FF7A883CC2F0A6AB80AE6F4CD3E45045273873E

 

See also @SHA256, @SHA512, @MD5, and @CRC32.