Encrypted, password protected file creation
I am writing a program that creates a Word document with sensitive information. I would like to encrypt and password protect a document and distribute it in a self extracting file so that the user can double click, provide the password, and then retrieve the unencrypted file.
I can create a Word document, but I need a third party program, script or not (I can use the command line) that can:
- Encrypt Word Document,
- Password. Protect encryption and
- Create a self-extracting file.
Can anyone suggest software for this purpose? Anything related to SSL security or higher is sufficient since the data was previously hosted on an SSL encrypted site.
source to share
If you want to encrypt a Word document dynamically on a LAMP server just like MS Word does, you can use the Crypto API for PHPDocX: CryptoPHPDocX .
Please note that encrypted MS Word files are MS Compound File Binaries and not standard OOXML / OPC files.
Advantages over other solutions:
- Office recognizes directly encrypted files as Word files
- Word prompts you for a password
- Whenever a modified Word document is saved, it retains its encrypted status
- Encryption algorithm - AES128
The CryptoPHPDocX API also allows you to secure the document (not secure, but quite useful for exachange documents that you want to protect from the direct version) and can also encrypt PDF files.
source to share