sponsored ads
sponsored ads
I use Aspose.Cells to add digital signature, and it works fine
using Aspose.Cells;
using Aspose.Cells.DigitalSignatures;
using System.Security.Cryptography.X509Certificates;
public void testSign()
{
DigitalSignatureCollection dsc = new DigitalSignatureCollection();
//mykey.pfx is author's private key , "tryto" is password of private key.
X509Certificate2 cert = new X509Certificate2("m:\\mykey.pfx", "tryto");
DigitalSignature ds = new DigitalSignature(cert, "helloworld", DateTime.Now);
dsc.Add(ds);
Workbook wb = new Workbook("m:\\test.xlsx");
wb.AddDigitalSignature(dsc);
wb.Save("m:\\test.xlsx");
}
Validate file:
public void testvalidateSign()
{
Workbook wb = new Workbook("m:\\test.xlsx");
System.Console.WriteLine(wb.IsDigitallySigned);
DigitalSignatureCollection dsc = wb.GetDigitalSignature();
foreach (DigitalSignature ds in dsc)
{
System.Console.WriteLine(ds.Comments);
System.Console.WriteLine(ds.SignTime);
System.Console.WriteLine(ds.IsValid);
}
System.Console.ReadLine();
}
2
If this is after you’ve created your account, you can navigate away from that webpage and go to mail.google.com and sign in (bypassing the verification process). This is what I did, I’m not sure if it still works though.
Answered Sep, 30 2011
0
use Aspose.Cells to add or get digital signature, and it works fine for me .
using Aspose.Cells;
using Aspose.Cells.DigitalSignatures;
using System.Security.Cryptography.X509Certificates;
public void testSign()
{
DigitalSignatureCollection dsc = new DigitalSignatureCollection();
//mykey.pfx is author's private key , "tryto" is password of private key.
X509Certificate2 cert = new X509Certificate2("m:\\mykey.pfx", "tryto");
DigitalSignature ds = new DigitalSignature(cert, "helloworld", DateTime.Now);
dsc.Add(ds);
Workbook wb = new Workbook("m:\\test.xlsx");
wb.AddDigitalSignature(dsc);
wb.Save("m:\\test.xlsx");
}
Validate file:
public void testvalidateSign()
{
Workbook wb = new Workbook("m:\\test.xlsx");
System.Console.WriteLine(wb.IsDigitallySigned);
DigitalSignatureCollection dsc = wb.GetDigitalSignature();
foreach (DigitalSignature ds in dsc)
{
System.Console.WriteLine(ds.Comments);
System.Console.WriteLine(ds.SignTime);
System.Console.WriteLine(ds.IsValid);
}
System.Console.ReadLine();
}
1
Search for Related Topics
c# itextsharp digital signature verify ar9285 cannon verify digital signature modem digital signature bijoy 52 actvation code qf9700 usb2.0 code 52 erreur code 52 prolific lenovo smbios code 52 lenovo code 52 code 52 voor atheros x220d modem codes +tataphoton modem code bracker code modem tele2
Related Unresolved Questions
sponsored ads
effect mirrir online icimapping tutorial 6.4 client eas 7 active desktop windows amivoice download free sp 6.12 dental imaging kodak software 1.0 dialer download free pc v1
Continue to downloadPower by Afreecodec.com