Decrypts a PGP encrypted file that was encrypted with a password (PBE, symmetric key encrypted).
Namespace:
DidiSoft
Assembly:
PGPLib (in PGPLib.dll) Version: 1.6.3.19546
Syntax
| Visual Basic (Declaration) |
|---|
Public Function DecryptFilePBE ( _
encryptedFileName As String, _
password As String, _
outputFileName As String _
) As String |
Parameters
- encryptedFileName
- Type: System..::.String
File name to be decrypted (absolute or relative path)
- password
- Type: System..::.String
Password used for symmetric encryption of the input file
- outputFileName
- Type: System..::.String
File name of the Output decrypted file (absolute or relative path)
Return Value
Original file name of the decrypted file as stored in the PGP file.
Examples
CopyC#
using System;
using DidiSoft;
public class DecryptPBEDemo
{
public void Demo()
{
PGPLib pgp = new PGPLib();
string inputFileLocation = @"c:\INPUT.pgp";
string password = "password";
string decryptedOutput = @"c:\OUTPUT.txt";
string originalFileName =
pgp.DecryptFile(inputFileLocation,
password,
decryptedOutput);
}
}
CopyVB.NET
Imports System
Imports DidiSoft
Public Class DecryptPBEDemo
Public Sub Demo()
Dim pgp As New PGPLib()
Dim originalFileName As String
originalFileName = _
pgp.DecryptFilePBE("c:\INPUT.pgp", _
"password", _
"c:\OUTPUT.txt")
End Sub
End Class
Exceptions
| Exception | Condition |
|---|
| PgpException | if an error has occured |
| System.IO..::.IOException | if a problem has reading input file or private key file |
See Also