ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Decrypting a file
fDecrypt (Example)
Decrypting a file
Reports and Queries The following code is used to decrypt a file. The password is entered in an edit control (EDT_Password). Priority was given to encryption security (cryptSecure).
// Declare the variables
EncryptedFile is string
DecryptedFile is string
ResDecrypt is boolean
 
// Select the encrypted file
EncryptedFile = "C:\MyDir\EncryptedFile.txt"
// Select the decrypted file
DecryptedFile = "C:\MyDir\DecryptedFile.txt"
 
// Decrypt the file
// Reminder: the password is entered in an edit control (EDT_Password)
ResDecrypt = fDecrypt(EncryptedFile, DecryptedFile, EDT_Password, cryptSecure)
 
// Display an error message if the decryption failed
IF ResDecrypt = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The file was decrypted")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2023

Send a report | Local help