Frends.Pgp.EncryptFile / 2.1.0
Summary
Encrypts a file with a recipient's public key, optionally from a key ring, so only the holder of the matching private key can read it.
Typical use — outbound files containing anything sensitive, which keeps the payload protected independently of the transport
Essential parameters.
| Name | Type | Default | Example | Description |
|---|---|---|---|---|
| SourceFilePath | String |
– | C:\temp\message.txt |
Full path to the file for encryption. |
| OutputFilePath | String |
– | C:\temp\message.pgp |
Full path for the encrypted file. |
| OutputFileExistsAction | OutputFileExistsAction |
– | OutputFileExistsAction.Overwrite |
Action for if the output file exists. Possible values:
|
| PublicKeySource | PublicKeySource |
– | PublicKeySource.File |
Source of the public key - file path or string. Possible values:
|
| PublicKeyPath | String |
– | C:\temp\publicKey.asc |
Path to the public key file. |
| PublicKeyString | String |
– |
-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----
|
Public key as a string, including the BEGIN/END PGP PUBLIC KEY BLOCK lines. |
| PublicKeyId | String |
– |
0x1234567890ABCDEF
1234567890ABCDEF
|
ID of the correct key in the key ring (Optional). If left empty first suitable key in key ring is used. |
| EncryptionAlgorithm | PgpEncryptEncryptionAlgorithm |
Cast5 |
PgpEncryptEncryptionAlgorithm.Cast5 |
Encryption algorithm to use Possible values:
|