News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate's Blog:
Encrypting uploaded files in PHP
November 09, 2010 @ 09:43:13

In this new post to his blog Sameer Borate looks at a method he's come up with to encrypt files uploaded into your application with the help of the Zend_Filter component of the Zend Framework.

As earlier I'd encountered Zends wonderful Zend_Filter class, I decided to go with it and use the Zend_Filter_Encrypt and Zend_Filter_Decrypt to accomplish the work. The Zend_Filter component provides a set of common useful data filters, among which are the encryption filters. Although my project was not developed in Zend, I could easily integrate the required classes in the code. Note that Zend has a great upload library, Zend_File_Transfer, that lets you easily manage file uploading and also encryption, but as I already had the upload code tested, I decided to just add the encryption part.

He includes the step-by-step process to get everything you need and which files you'll need to have included from the framework to make things work. He includes code for both encrypting and decrypting the file information as well as hints on selecting an algorithm and a random initialization vector. You can download the complete source if you want to jump right in.

0 comments voice your opinion now!
encrypt upload file tutorial zendframework zendfilter


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: Chapters One and Two of "Zend Framework: Surviving the Deep End" Book Released

Elizabeth Smith's Blog: How to Compile PHP5.2 and PHP-GTK2 on Windows using Visual C++ Express

DevShed: Handling HTML Strings and Files with the DOM XML Extension in PHP 5

Rob Allen's Blog: Determining if a ZF view helper exists

ProDevTips.com: Ajax, ZF and Smarty feed reader (Part 2)


Community Events





Don't see your event here?
Let us know!


library voicesoftheelephpant security introduction laravel update opinion version series composer community release package mvc interview symfony tool podcast language framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework