Verifies the passed in stream as being correctly signed.
Namespace:
DidiSoft
Assembly:
PGPLib (in PGPLib.dll) Version: 1.6.3.19546
Syntax
| Visual Basic (Declaration) |
|---|
Public Function VerifyFile ( _
dataFileName As String, _
publicKeyFileName As String, _
outputFileName As String _
) As Boolean |
Parameters
- dataFileName
- Type: System..::.String
File name to be encrypted (absolute or relative path)
- publicKeyFileName
- Type: System..::.String
Key ring file name (absolute or relative path)
- outputFileName
- Type: System..::.String
File name of the Output decrypted file (absolute or relative path). Optional parameter.
If empty the name stored in the PGP decrypted file is used.
Return Value
true if signed correctly, false if not signed with this public key
Examples
CopyC#
using System;
using DidiSoft;
public class VerifyDemo
{
public void Demo()
{
PGPLib pgp = new PGPLib();
bool validSignature = pgp.VerifyFile(@"C:\DATA_signed.pgp",
@"C:\public.pkr",
@"C:\DATA.dat");
Console.WriteLine(validSignature);
}
}
CopyVB.NET
Imports System
Imports DidiSoft
Public Class VerifyDemo
Public Sub Demo()
Dim pgp As New PGPLib()
Dim validSignature As Boolean = _
pgp.VerifyFile("C:\DATA_signed.pgp", _
"C:\public.pkr", _
"C:\DATA.dat")
Console.WriteLine(validSignature)
End Sub
End Class
Exceptions
See Also