Can somebody know what is wrong with my code?
I kept getting error on this line below:
bool validSignature = pgp.VerifyString(verifyRichTextBox.Text, new FileInfo(openFileDialog1.FileName), out plainText);
The error is that the path is not of legal path.
Below is the full code:
public void verifyAll()
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Title = "PLEASE CHOOSE SENDER'S PUBLIC KEY";
string plainText;
bool validSignature = pgp.VerifyString(verifyRichTextBox.Text, new FileInfo(openFileDialog1.FileName), out plainText);
if (validSignature == true)
verifyRichTextBox.Text = "Signature is valid!\n\n" + plainText;
else
MessageBox.Show("Signature is invalid!", "Invalid Signature", MessageBoxButtons.OK ,MessageBoxIcon.Exclamation);
}
This is a public/private key signing and verifying program. This part is the verifying part of a signed message. Everything uses didisoft OpenPGP.