4D Pack v12

AP Get file MD5 digest

Home

 
4D Pack v12
AP Get file MD5 digest

 

AP Get file MD5 digest 


 

AP Get file MD5 digest ( filePath ; digest ; fork ) -> Function result 
Parameter Type   Description
filePath  Text in Complete pathname of file
digest  Text in MD5 Digest of file
fork  Longint in 0=Data fork, 1=Resource fork
Function result  Longint in Error code

The AP Get file MD5 digest command returns the MD5 digest key of a specific document. The MD5 (Message Digest 5) algorithm is a hashing function used for encrypting data.

Pass the name of the document containing the key in the filePath parameter. The MD5 digest key is returned in the digest parameter.

The fork parameter can be used to set, under Mac OS only, the part of the file to be selected:

  • 0 for the data fork
  • 1 for the resource fork.

Example  

1. Typical use of command:

 C_TEXT($thedoc)
 C_TEXT(<>digest)
 C_LONGINT($resfork)
 $resfork:=0
 $thedoc:=Select document
 $error:=AP Get file MD5 digest($thedoc;<>digest;resfork)

 
PROPERTIES 

Product: 4D Pack
Theme: 4D_Pack : Utilities
Number: 61950

 
HISTORY 

Created: 4D Pack v11