Decrypts OpenPGP encrypted data in the form of byte array with a private key supplied also as byte array.

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

Syntax

C#
public string DecryptBytes(
	byte[] encryptedBytes,
	byte[] privateKeyBytes,
	string privateKeyPassword,
	out byte[] outputBytes
)
Visual Basic (Declaration)
Public Function DecryptBytes ( _
	encryptedBytes As Byte(), _
	privateKeyBytes As Byte(), _
	privateKeyPassword As String, _
	<OutAttribute> ByRef outputBytes As Byte() _
) As String
Visual C++
public:
String^ DecryptBytes(
	array<unsigned char>^ encryptedBytes, 
	array<unsigned char>^ privateKeyBytes, 
	String^ privateKeyPassword, 
	[OutAttribute] array<unsigned char>^% outputBytes
)

Parameters

encryptedBytes
Type: array< System..::.Byte >[]()[]
OpenPGP encrypted data as byte array
privateKeyBytes
Type: array< System..::.Byte >[]()[]
Private key bytes
privateKeyPassword
Type: System..::.String
Private key password
outputBytes
Type: array< System..::.Byte >[]()[] %
Decrypted content

Return Value

File name of the decrypted file.

Exceptions

ExceptionCondition
PgpExceptionif an error has occured
System.IO..::.IOExceptionif a problem has occured reading input file or private key file

See Also