OpenPGP Signs and encrypts given file with public and private key located in keystore

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

Syntax

C#
public void SignAndEncryptFile(
	string inputFileName,
	KeyStore keyStore,
	long privateKeyId,
	string privateKeyPassword,
	long signKeyId,
	string outputFileName,
	bool armor,
	bool withIntegrityCheck
)
Visual Basic (Declaration)
Public Sub SignAndEncryptFile ( _
	inputFileName As String, _
	keyStore As KeyStore, _
	privateKeyId As Long, _
	privateKeyPassword As String, _
	signKeyId As Long, _
	outputFileName As String, _
	armor As Boolean, _
	withIntegrityCheck As Boolean _
)
Visual C++
public:
void SignAndEncryptFile(
	String^ inputFileName, 
	KeyStore^ keyStore, 
	long long privateKeyId, 
	String^ privateKeyPassword, 
	long long signKeyId, 
	String^ outputFileName, 
	bool armor, 
	bool withIntegrityCheck
)

Parameters

inputFileName
Type: System..::.String
File Name to be PGP Signed (absolute or relative path)
keyStore
Type: DidiSoft..::.KeyStore
KeyStore instance
privateKeyId
Type: System..::.Int64
Key Id of the Private Key used for excryption, located in keyStore.
privateKeyPassword
Type: System..::.String
Private key password
signKeyId
Type: System..::.Int64
Key Id of the Public Key used for signing, located in keyStore.
outputFileName
Type: System..::.String
File name of the PGP Signed file (absolute or relative path)
armor
Type: System..::.Boolean
if true, output file is in ASCII armored format
withIntegrityCheck
Type: System..::.Boolean
Should integrity check information be added to the file.

Remarks

* (Note that this is not the same as first encrypt and then sign a file, because in that case a double compressing is performed.)

Exceptions

ExceptionCondition
PgpExceptionif an error has occured

See Also