In a 'C' program, if I write a line something like as follows:
system ("echo password | gpg --no-tty -q --passphrase-fd 0 -d add2numbers.sh.asc | bash -s 3 4");
where I am decrypting an encrypted script file, add2numbers.sh.asc using GnuPG (i.e. gpg) tool and executing the script. To decrypt the file, I need to provide the password. Here is the security matters. When I am executing the corresponding executable, I can see the password through "ps" command in linux.
So, please provide me a solution how to hide the password when executing a statement using "system" function.
THANKS IN ADVANCE for any small help.
Start Free Trial