The Encrypted Local Stream Wrapper module extends the temporary and private
stream wrapper classes to provide encryption for files.
When installed and enabled, two new stream wrapper classes are available: etemporary and eprivate. They are built on top of the standard temporary and private local stream wrappers and store data in etemporary and eprivate sub-directories of their parents respectively. Module developers can then write to and read from these streams by specifying URIs like etemporary://foo.txt
The encryption algorithm used is the Rijndael algorithm with a 256 bit key. An encryption key is generated automatically when a stream is created and stored in a cookie so that only the user who created the file can access it. This works fine for temporary files but the module developer needs to manage the keys for files intended to be shared between users or saved indefinitely.
A typical usage scenario would be to encrypt generated PDF files with sensitive information and then provide links to the generated files to the user.
- Automatic encryption/decryption of generated files
The PHP mcrypt library must be enabled.
This module was developed on PHP 5.3 but not tested on other versions for compatibility.
Not applicable. It provides additional functionality for module developers but there is nothing to see or configure for the administrator or user.
None at this time.
Links to Documentation
The README.txt file included with the module contains more detailed design and usage information.
As this is my first public module, I am not making any pledges at this point.
The Encrypt module is also a utility library, but does not expose Stream Wrapper functionality.