Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Encrypted PGP Passphrase

$
0
0

Can anyone help me on this? I’m trying to store the pgppassphrase in an encrypted text file.

I encrypt the file like this.

$pgppassphrase="Password123" $pgppassphrase | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString | Out-File f:scriptsPass.txt 

Then i call the txt file like this and pass it this way.

 $pgppassphrase= Get-Content f:scriptspass.txt | Converto-SecureString gpg --batch --passphrase $pgppassphrase --decrypt-file f:temp*.pgp 

submitted by /u/RampageUT
[link] [comments]

The post Encrypted PGP Passphrase appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles