I need to encrypt and decrypt (using a secret key) documents (namely pdf). Is there any snipet in php?
I found a solution: http://www.codediesel.com/php/encrypting-uploaded-files-in-php/
PHP has a GnuPG module that you can use.