how to encrypt a readfile($file) on the fly ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



is it possible to encypt a file dynamically as it is being readfile'd ?
I want to create a key stored in a db that decrypts the file once it reaches the user's computer. This file is being progressively loaded...loads and plays at the same time

something like:

header("ETag: ".md5(time()));
header("Accept-Ranges: bytes");
header ("Content-Length: ".fileSize($file2Encrypt));
header("Content-Type: ".$mime);
readfile_whileEncrypting($file2Encrypt,MCRYPT_3DES));

is there a PHP function out there that can do this ?


g

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux