Decrypts OpenPGP encrypted data in the form of byte array with a private key supplied also as byte array.
Namespace: DidiSoft.PgpAssembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547
Syntax
| C# |
|---|
public string DecryptBytes( byte[] encryptedBytes, byte[] privateKeyBytes, string privateKeyPassword, out byte[] outputBytes ) |
| Visual Basic |
|---|
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
| Exception | Condition |
|---|---|
| DidiSoft.Pgp..::..PGPException | if an OpenPGP related error has occurred |
| System.IO..::..IOException | I/O error |
| NonPGPDataException | if the input data is not a valid OpenPGP encrypted message |