EvotecIT / PSPGP

PSPGP is a PowerShell module that provides PGP functionality in PowerShell. It allows encrypting and decrypting files/folders and strings using PGP.
MIT License
57 stars 21 forks source link

Unprotect-PGP paramset can't be resolved if there is no password/credential #4

Closed Szeraax closed 2 years ago

Szeraax commented 3 years ago

As stated, if you use a PGP key that has no passphrase to use it, the cmdlet errors with this message:

 Unprotect-PGP : Parameter set cannot be resolved using the specified named parameters.

Probably just need to add in another parameter set for file/folder decryption that doesn't take either.

PrzemyslawKlys commented 3 years ago

I wasn't aware you can use the PGP key without a password. This needs fixing. Feel free to submit PR, otherwise I'll do it at some point.

mchassy commented 1 year ago

Is there anything to be done once I have created my keys without a password? I have moved from a windows machine to a mac. On the windows machine I used the powershell commanlets and pointed to the private key files. On the mac, I can still do that with powershell for mac. But if I try using bash scripts using gpg commands, I am asked to give the password. Can I modfy my keys to add a password using the comandlets?