|
|
|
|
|
- Encrypting and decrypting an external file
- Encryption in Android/Java and decryption by a WINDEV application (or conversely)
Advertencia
A partir de la versión 24, Crypt se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por Encrypt.
Encrypts a character string in binary format or in ASCII format. Remarks: - This character string can be decrypted by Decrypt.
- If the encryption and the decryption are performed on different platforms (encryption in Android and decryption in Windows for example), use EncryptStandard and DecryptStandard. For more details, refer to the "Remarks" paragraph.
// Encrypt a string Res = Encrypt("My credit card number is 52327453829011", "Password")
// Encode a string in base 64 bufBase64 is Buffer = Encrypt(bufToEncode, "", compressNone + cryptNone, encodeBASE64)
Sintaxis
<Result> = Encrypt(<String to encrypt> , <Password> [, <Type of encryption> [, <Format of encrypted string>]])
<Result>: Character string - Encrypted character string,
- Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo.
<String to encrypt>: Character string Text to encrypt. <Password>: Character string Password used to encrypt the character string. This password will be used to decrypt the encrypted string (Decrypt). A long password optimizes the encryption security. <Type of encryption>: Optional constant (or combination of constants) Indicates the type of encryption and/or compression:- Type of compression:
| | compressLZW | The string will be compressed before it is encrypted. This constant has no effect. | compressNone (Default value) | No compression is performed. This constant has no effect. | compressShortString | The string will be compressed via an algorithm optimized for the short character strings. This compression will be effective only if the cryptNone constant is selected and if <Format of encrypted string> corresponds to the encodeNone constant. This constant has no effect. |
<Format of encrypted string>: Optional Integer constant Indicates the format of encrypted string: | | encodeBASE64 | BASE 64 format. The file is encrypted with the BASE64 algorithm. The encrypted file will be larger (about 30%) than the initial file. To perform an encoding in base 64, you also have the ability to use Encode associated with the encodeBASE64 or encodeBASE64URL constant. The base64 format can be used to insert an encrypted file into the email body for example. | encodeNone | Binary format. The encrypted file may contain non-printable characters. The file will be larger (about 4 bytes) than the initial file. | encodePCS (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 Encrypting and decrypting an external file
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|