PGP Encrypts given file using Public key from a Key store

Namespace:  DidiSoft
Assembly:  PGPLib (in PGPLib.dll) Version: 1.6.3.19546

Syntax

C#
public void EncryptFile(
	string dataFileName,
	KeyStore keyStore,
	long keyId,
	string outputFileName,
	bool asciiArmor,
	bool withIntegrityCheck
)
Visual Basic (Declaration)
Public Sub EncryptFile ( _
	dataFileName As String, _
	keyStore As KeyStore, _
	keyId As Long, _
	outputFileName As String, _
	asciiArmor As Boolean, _
	withIntegrityCheck As Boolean _
)
Visual C++
public:
void EncryptFile(
	String^ dataFileName, 
	KeyStore^ keyStore, 
	long long keyId, 
	String^ outputFileName, 
	bool asciiArmor, 
	bool withIntegrityCheck
)

Parameters

dataFileName
Type: System..::.String
File name to be encrypted (absolute or relative path)
keyStore
Type: DidiSoft..::.KeyStore
KeyStore instance
keyId
Type: System..::.Int64
Key Id of the Private Key located in keyStore.
outputFileName
Type: System..::.String
File name of the Output encrypted file (absolute or relative path)
asciiArmor
Type: System..::.Boolean
Should the encrypted file be in ASCII Armored mode. If false the encrypted file is in binary format.
withIntegrityCheck
Type: System..::.Boolean
Should integrity check information be added to the encrypted file.

Remarks

Compression algorithm used is the one specified through Compression
Symmetric cipher algorithm used is the one specified through Cypher

Exceptions

ExceptionCondition
PgpExceptionif no public key exists with the specified keyId

See Also