Method CryptFile():decrypt() Professional

Decrypts a file.

Syntax
:decrypt(<cSourceFile>, [<cTargetFile>])  --> lSuccess 
Parameters
<cSourceFile>
The file name of the encrypted source file.
<cTargetFile>
The file name of the target file. If this parameter is not passed, the name of the target file is obtained from the file header of the encrypted <cSourceFile>.
Return

If decryption was succesfull, .T. is returned. Otherwise .F. is returned, and the error code can be retrieved by calling FError().

Description

The method :decrypt() can be used to decrypt a file. The file must be encrypted by CryptFile():encrypt(). The method reads the header and the first data block first to validate the source file. If the source file is recognized as a valid encrypted file, decryption of the rest of the file is started. The target file will have the same content and length as the original file, but might differ in the name and timestamp.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.