- Encrypting and decrypting an external file
- Decrypting a stream in base64binary format
- Encryption in PHP
- Encryption in Android/Java and decryption by a WINDEV application (or conversely)
In french: Décrypte
From version 24
is kept for backward compatibility. This function is replaced by Decrypt
Decrypts a character string that was encrypted by Encrypt
Remark: 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
ResEncrypt = Encrypt("The number of my bank account in Switzerland is 74538290", "Password")
// Decrypt the string
Res = Decrypt(ResEncrypt, "Password")
// Decode the data encoded in base 64
bufDecode is Buffer = Decrypt(bufBase64, "", crypteNone, encodeBASE64)
<Result> = Decrypt(<Encrypted string> , <Password> [, <Type of encryption used> [, <Format of encrypted string>]])
Encrypting and decrypting an external file
Decrypting a stream in base64binary format
To decrypt a string encrypted in base64, you must use:
ResultString = Decrypt(EncryptedString, "", cryptNone, encodeBASE64)
ResultString = Decrypt(EncryptedString, encodeBASE64)
Encryption in PHP
In PHP, the BlowFish encryption (cryptFast constant) and the RINJDAEL encryption (cryptSecure constant) are based on the MCrypt library. This library is commonly used by the PHP hosting companies and therefore it is always enabled. This library can be downloaded from the PHP site.
To enable (if necessary) this library locally, the following elements are required:
- PHP installed.
- the PHP.INI file found in the Windows directory must include the "extension=php_mcrypt.dll" line.
- the php_mcrypt.dll file must exist in the directory of PHP extensions. This directory is defined in the PHP.INI file by the "extension_dir" variable.
Encryption in Android/Java and decryption by a WINDEV application (or conversely)
Caution: the encryption/decryption algorithms used in Java and Android differ from the ones used by WINDEV. Therefore, you cannot encrypt a character string in Java or Android and decrypt it with WINDEV (and conversely).
This page is also available for…