EncryptFile
Encrypts a file using public or private key. Additionally can be configured to use key rings.
Task version: 1.0.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
SourceFilePath : String
Full path to the file for encryption.
Default: -
Example: C:\temp\message.txt
OutputFilePath : String
Full path for the encrypted file.
Default: -
Example: C:\temp\message.pgp
OutputFileExistsAction : OutputFileExistsAction
Action for if the output file exists.
Possible values:
Overwrite: Action for if the output file exists.Error: Action for if the output file exists.
Default: -
Example: OutputFileExistsAction.Overwrite
PublicKeyFile : String
Full path for the public key.
Default: -
Example: C:\temp\publicKey.asc
PublicKeyId : String
ID of the correct key in the key ring (Optional).
If left empty first suitable key in key ring is used.
Default: -
Example: 0x1234567890ABCDEF 1234567890ABCDEF
EncryptionAlgorithm : PgpEncryptEncryptionAlgorithm
Encryption algorithm to use
Possible values:
Aes128: Encryption algorithm to useAes192: Encryption algorithm to useAes256: Encryption algorithm to useBlowfish: Encryption algorithm to useCamellia128: Encryption algorithm to useCamellia192: Encryption algorithm to useCamellia256: Encryption algorithm to useCast5: Encryption algorithm to useDes: Encryption algorithm to useIdea: Encryption algorithm to useTripleDes: Encryption algorithm to useTwofish: Encryption algorithm to use
Default: 7
Example: PgpEncryptEncryptionAlgorithm.Cast5
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure. True by default.
Default: True
Example: false
UseArmor : Boolean
Use ascii armor or not.
Default: True
Example: true
UseIntegrityCheck : Boolean
Check integrity of output file or not.
Default: True
Example: true
UseCompression : Boolean
Should compression be used?
Default: True
Example: true
CompressionType : PgpEncryptCompressionType
Type of compression to use
Possible values:
BZip2: Type of compression to useUncompressed: Type of compression to useZip: Type of compression to useZLib: Type of compression to use
Default: 2
Example: PgpEncryptCompressionType.Zip
EncryptBufferSize : Int32
Buffer size in KB that will be used when encrypting the file.
Default: 64
Example: 64
SignWithPrivateKey : Boolean
Should the encrypted file be signed with private key?
Default: False
Example: true
SigningSettings : PgpEncryptSigningSettings
File signing related settings
Default: -
Example: PrivateKeyFile: C:\temp\privateKeyFile.gpg, PrivateKeyPassword: passphrase, SignatureHashAlgorithm: PgpEncryptSignatureHashAlgorithm.Sha1
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Failed to encrypt file.
Task Result
Success : Boolean
Indicates whether the encryption was successful.
Example: true
FilePath : String
File path to the encrypted file.
Example: C:\temp\message.pgp
Error : Error
Error that occurred during task execution.
Example: object { string Message, object { Exception Exception } AdditionalInfo }
Task Changelog
Changelog for Task Frends.Pgp.EncryptFile.
[1.0.0] - 2025-12-12
Added
Initial implementation
Last updated
Was this helpful?

