Decrypts a PGP encrypted message.

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

Syntax

C#
public string DecryptString(
	string encryptedString,
	Stream privateKeyStream,
	string privateKeyPassword
)
Visual Basic (Declaration)
Public Function DecryptString ( _
	encryptedString As String, _
	privateKeyStream As Stream, _
	privateKeyPassword As String _
) As String
Visual C++
public:
String^ DecryptString(
	String^ encryptedString, 
	Stream^ privateKeyStream, 
	String^ privateKeyPassword
)

Parameters

encryptedString
Type: System..::.String
OpenPGP encrypted message
privateKeyStream
Type: System.IO..::.Stream
Private key stream
privateKeyPassword
Type: System..::.String
Private key password

Return Value

Decrypted string

Exceptions

ExceptionCondition
PgpExceptionif an error has occured
System.IO..::.IOExceptionif a problem has occured reading private key file
System..::.ArgumentExceptionIf this private key cannot decrypt the message

See Also