|
|
|
|
|
- Error handling
- Operating mode in Windows Vista (and later)
- Encrypting/Decrypting a character string
Advertencia
A partir de la versión 24, fCrypt se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por fEncrypt.
Encrypts a file in binary or ASCII format. Note This file can be decrypted with fDecrypt.
Sintaxis
<Result> = fEncrypt(<Path of file to encrypt> , <Path of encrypted file> , <Password> [, <Type of encryption> [, <Format of encrypted file>]])
<Result>: Boolean - True if encryption has been performed,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Path of file to encrypt>: Character string Name and full (or relative) path of the file to encrypt (up to 260 characters). A UNC path can be used.
<Path of encrypted file>: Character string Name and full (or relative) path of the encrypted file (up to 260 characters). A UNC path can be used.
<Password>: Character string or Secret string Password used to encrypt the file. This password will be used to decrypt the encrypted file (fDecrypt). A long password provides better encryption security.
Novedad versión 2025Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string". Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas. Novedad versión 2025 <Type of encryption>: Optional constant Indicates the type of encryption: | | encryptFast (Default value) | Priority is given to the encryption speed (algorithm on 128 bits).
| encryptNone | No encryption is performed. | encryptRC516 | Priority is given to the encryption security (RC5 algorithm on 16 rounds).
| encryptSecure | Priority is given to the encryption security (RC5 algorithm on 128 bits).
|
<Format of encrypted file>: Optional Integer constant Indicates the format of the encrypted file: | | encodeBASE64 | BASE 64 format. The file is encrypted with the BASE64 algorithm. The encrypted file will be larger (about 30%) than the initial file. This format can be used to insert an encrypted file into the email body for example. | encodeNone or False | Binary format. The encrypted file may contain non-printable characters. The file will be larger (about 4 bytes) than the initial file. | encodePCS or True (Default value) | ASCII format. The encrypted file will contain printable characters only. The encrypted file will be larger (about 30%) than the initial file. This format can be used to insert an encrypted file into the email body for example. | encodeUUEncode | UUEncode format. The file is encrypted with the UUEncode algorithm. The encrypted file will be larger (about 30%) than the initial file. This format can be used to insert an encrypted file into the email body for example. |
Observaciones fEncrypt throws an error in the following cases: - the file to encrypt does not exist,
- the file to encrypt is locked,
- the path of the file to encrypt is invalid,
- <Password> is an empty string,
- the user has no read rights on the file to encrypt,
- the user has no write rights on the encrypted file.
Encrypting/Decrypting a character string
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|