PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Decrypting a file
  • Decrypting a file (WINDEV Mobile)
fDecrypt (Example)
Decrypting a file
WINDEVWEBDEV - Server codeReports and QueriesJavaAjaxUser code (UMC) 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
Decrypting a file (WINDEV Mobile)
Windows Mobile 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 = "\My files\FileA.txt"
DecryptedFile is string = "\My files\FileB.txt"
ResDecrypt is boolean

// 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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment