Recommend this page to a friend! |
Classes of Martin Latter | PHP OpenSSL Encrypt and Decrypt File | README.md | Download |
|
DownloadOpenSSL File EncryptSimple symmetric file encryption.PurposeProvide strong file encryption using OpenSSL, via an easy-to-use PHP wrapper. One use is to avoid direct OpenSSL interaction, such as:
and offer something simpler:
ExampleEncrypt
results in the encrypted file abc.txt.osl Decrypt
results in abc.txt, with the correct password -- and overwrites the original file abc.txt if it is present in the same directory. Max File SizeThe maximum file size that can be processed is approximately 1.8GB. This limit is seemingly dictated by the PHP openssl module (OpenSSL itself on the command-line will process 2GB+ files). Low Memory SystemsA file-chunking version for limited memory availability works with the non-counter (CTR) mode ciphers. Appending the HMAC to the final file and decrypting successfully is not yet ready. LicenseOpenSSL File Encrypt is released under the GPL v.3. |