!************************************************************************
Begin-Procedure PGP
!************************************************************************
Let $pgp_cmd = 'pgp --encrypt --armor Filepath/Filename.csv --user "0x43D24C70" --output /Filepath/Filename.csv.pgp'
do Encryption
End-Procedure PGP
!************************************************************************
Begin-Procedure Encryption
!************************************************************************
Display 'Moved File'
Display 'PGP Cmd = ' noline
Display $pgp_cmd
CALL SYSTEM USING $pgp_cmd #op_status
if #op_status = 0
Display 'PGP Encryption success'
else
Display 'Encryption Failed = ' noline
Display #op_status
end-if
End-Procedure Encryption
Encryption Unix Command
Example:
pgp --encrypt "E:\temp\test1.txt" --recipient "Wells Fargo - PGP" --home-dir "<C:\Program Files\PGP Corporation\PGP Command Line>" --sign --signer "YourKeyNameOrKeyID" --passphrase "YourPassphrase"
pgp --encrypt "E:\temp\test1.txt" --recipient "Wells Fargo - PGP" --home-dir "<C:\Program Files\PGP Corporation\PGP Command Line>" --sign --signer "YourKeyNameOrKeyID" --passphrase "YourPassphrase"
You can also combine --encrypt and --sign flags into one command, -es (only one dash for shorthand commands):
pgp -es "E:\temp\test1.txt" --recipient "Wells Fargo - PGP" --home-dir "<C:\Program Files\PGP Corporation\PGP Command Line>" --signer "YourKeyNameOrKeyID" --passphrase "YourPassphrase"
pgp -es "E:\temp\test1.txt" --recipient "Wells Fargo - PGP" --home-dir "<C:\Program Files\PGP Corporation\PGP Command Line>" --signer "YourKeyNameOrKeyID" --passphrase "YourPassphrase"
No comments:
Post a Comment