Thursday, 24 October 2019

PGP Encrypt and Decrypt Script


#!/bin/bash

SourceFilePath=$1
OutFilePath=$2
PublicKeyUser=$3

echo "Running GPG Encrypt Command"

gpg --batch --yes --trust-model always -r $PublicKeyUser -o $OutFilePath -e $SourceFilePath


--------------------------------------------

#!/bin/bash


SourceFilePath=$1
OutputFileName=$2
PassPhrase=$3

echo "Running GPG Decrypt Command"

cat $PassPhrase | gpg --output $OutputFileName --batch --yes --passphrase-fd 0 $SourceFilePath

No comments:

Post a Comment

Oracle - OCI - Exadata Database

Exadata Database is a scalable, private database server that is completely isolated from other tenants. It can be used to run all database ...