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

IDCS - Identity Federation with Azure and Google (SAML IDP & Social IDP)

The setup involves Identity Cloud Service (IDCS) acting as the central identity provider, facilitating seamless authentication and authoriza...