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

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

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

 

Returns the SHA-512 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 %@sha512[c:\windows\notepad.exe]

2F37A2E503CFFBD7C05C7D8A125B55368CE11AAD5B62F17AAAC7AAF3391A6886FA6A0FD73223E9F30072419BF5762A8AF7958E805A52D788BA41F61EB084BFE8

 

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