Is it possible to encrypt file symmetrically with 1 (one)
command line?
Chris De Young
chd at chud.net
Fri Oct 1 00:12:23 CEST 2004
On Thu, Sep 30, 2004 at 11:25:33PM +0200, Oleksiy Muzalyev wrote:
> Hi,
>
> When I enter:
> gpg -a -c data.php
>
> gpg asks for the password, I enter it, and it asks to repeat.
>
> Is there something like:
>
> gpg -a -c data.php --password MyPassword
>
> I call from VB2005:
>
> Shell("c:\gnupg\gpg.exe -a -c " & fileToEncrypt, AppWinStyle.NormalFocus)
>
> And console window opens and asks twice for the password.
>
> I would prefer to send the file path and password in one command.
Offhand I don't know of any switches that you can use to pass the
passphrase on the command line, though I might be missing one. If
it's acceptable to store the passphrase in a separate file (probably
no more risky that coding it into a script), you could use:
gpg -a -c --batch --passphrase-fd n filename
which will read the password from file descriptor n. 0 means standard
input, though that's not what you want in the case.
Cheers,
-Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20040930/ce501125/attachment.bin
More information about the Gnupg-users
mailing list