Encrypting a file
Moderator: General Moderators
Encrypting a file
Well no one in the security section seems to have any advice so I will post this here. I have a simple file upload form allows my clients to upload the file on the server. Then through the admin section I can download it. How can I make the file get encrypted when the clients upload it, then decrypt when I download it????
-
jason.carter
- Forum Commoner
- Posts: 35
- Joined: Sat Jan 10, 2009 10:05 am
Re: Encrypting a file
Try this
?php
$gpg = '/usr/bin/gpg';
$recipient = 'john@doe.com';
$secret_file = 'secret_file.txt';
echo shell_exec("$gpg -e -r $recipient $secret_file");
?>
See http://devzone.zend.com/node/view/id/1265
?php
$gpg = '/usr/bin/gpg';
$recipient = 'john@doe.com';
$secret_file = 'secret_file.txt';
echo shell_exec("$gpg -e -r $recipient $secret_file");
?>
See http://devzone.zend.com/node/view/id/1265