AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
fEncrypt (Example)
WINDEVWEBDEV - Código ServidorReportes y ConsultasJavaAjax Encrypting a file
The following code is used to encrypt a file. The password is entered in an edit control (EDT_Password). Priority is given to the encryption security (cryptSecure constant). The file may contain non-printable characters (False boolean).
// Declare the variables
FileToEncrypt is string
EncryptedFile is string
ResEncrypt is boolean
 
// Select the file to encrypt
FileToEncrypt = "C:\MyDirectories\File.txt"
 
// Select the encrypted file
EncryptedFile = "C:\MyDirectories\EncryptedFile.txt"
 
// Encrypt the file
ResEncrypt = fEncrypt(FileToEncrypt, EncryptedFile, EDT_Password, cryptSecure, False)
// Display an error message if the encryption failed
IF ResEncrypt = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The file was encrypted")
END
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2023

Señalar un error o enviar una sugerencia | Ayuda local