user192344
user192344

Reputation: 1396

how to use php call linux GPG encrypt file with a passphase

I have a task which need to

use gpg to encrypt the upload file in php

my code is:

("echo '1234' | gpg --passphrase-fd 0 -c /path/aaa.jpg ");

it works by paste the code in linux

but not work by php any solution

Upvotes: 0

Views: 668

Answers (1)

Nigel
Nigel

Reputation: 1715

You need to use gnupg_decypt() to decrypt the text.

Upvotes: 1

Related Questions