ozzthegod Posted March 27, 2008 Share Posted March 27, 2008 Hi, I am banging my head against the wall for last 5 days. I CANT find any way to encrypt uploaded files (any extension txt,pdf,mp3,exe...etc). I am working on a data management system and it needs to have encryption so the files people are storing with it can be accessed only from the app. app was created in Flex and it uses PHP to handle file upload. the biggest problem is that i have no idea on which server it will be hosted so the encryption i implement needs to be multi-platform(so no shell_exec unfortunately). i have tryed anything i could think of, i even tryed to pull data from the file, encrypt it and then write it back into the file but that doesnt work properly with anything that is not txt. so that rules out mcrypt, crypt... does anyone have any experience with this kind of problem if nothing else point me to the right direction. TNX A MILLION with a cheery on top. Link to comment https://forums.phpfreaks.com/topic/98165-encrypting-uploaded-files-help-please/ Share on other sites More sharing options...
cooldude832 Posted March 27, 2008 Share Posted March 27, 2008 you shouldn't encrypt the file data, but instead protect the file location Link to comment https://forums.phpfreaks.com/topic/98165-encrypting-uploaded-files-help-please/#findComment-502225 Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 The mcrypt library contains a bunch of popular encryption algorithms. Moving the file to a directory outside of the webroot and serving it through PHP is the better solution though, assuming your server is decently secured This can be a bit resource heavy if the file sizes are large, though. Link to comment https://forums.phpfreaks.com/topic/98165-encrypting-uploaded-files-help-please/#findComment-502233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.