for a little security reasons I must encrypt (in php) (and decrypt later) some pdf in my server.
How can I do this? I can do it in php with gnupg?
I've try to search in internet some example but I haven't found anything
Can You help me?
for a little security reasons I must encrypt (in php) (and decrypt later) some pdf in my server.
How can I do this? I can do it in php with gnupg?
I've try to search in internet some example but I haven't found anything
Can You help me?
You can use ssh2 library with the gnupg form the command line. I think it is very powerful solution, but You have to be careful with ssh2 library:)
What OS do You prefer?
You can use the GnuPG extension, but for a PDF file, it'd probably be easiest to just fork out to gpg(1)
with exec
.
Something like this might work, assuming you have the key in your GPG keychain already:
exec(escapeshellcmd("gpg -e -r " .
escapeshellarg($key_id) . " " .
escapeshellarg($filename)));