Frends.Pgp.DecryptFile / 1.5.0
Summary
Decrypts a PGP-encrypted file with a private key, taken from a file or from a string, into a plaintext file.
Typical use — the inbound half of PGP exchange with a partner; the passphrase belongs in an environment variable, not the Process
Essential parameters.
| Name | Type | Default | Example | Description |
|---|---|---|---|---|
| SourceFilePath | String |
– | C:\secrets\message.gpg |
Path to the file containing the data to be decrypted. |
| OutputFilePath | String |
– | C:\messages\result.txt |
Path where the decrypted file will be saved to. |
| DecryptBufferSize | Int32 |
64 |
64 |
Buffer size in KB that will be used when decrypting the file. |
| PrivateKeySource | PrivateKeySource |
– | PrivateKeySource.File |
Source of the private key - file path or string. Possible values:
|
| PrivateKeyPath | String |
– | C:\keys\my_key.asc |
Path to the private key file. |
| PrivateKeyStringSecret | String |
– |
-----BEGIN PGP PRIVATE KEY BLOCK-----
...
-----END PGP PRIVATE KEY BLOCK-----
|
Private key as a string, including the BEGIN/END PGP PRIVATE KEY BLOCK lines. |
| PassphraseEncoding | PassphraseEncoding |
– | PassphraseEncoding.Utf8 |
Encoding used for the private key passphrase. Defaults to Utf8. Use Legacy if the passphrase contains non-ASCII characters and the key was created with an older PGP tool. Possible values:
|
| PrivateKeyPassphraseSecret | String |
– | P@ssw0rd |
Passphrase for the private key. |