Encrypt in PHP and decrypt in AS3?

I am making an AIR project. In that the AIR application sends a request to a PHP script. The script returns an encrypted file. Then the Application decrypts it. How to do this?
(I don’t want the process to send the file unencrypted and the AIR to encrypt it because I want the file link encrypted.)
Also is there anyway like modifying the header of the file or something like that?