Announcement

Collapse
No announcement yet.

Sign With X509Certificate2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sign With X509Certificate2


    Hi, I'm testing your SDK product... I'm interested in the digital signature.
    Can I sign with a certificate installed in my computer? (X509Certificate2)
    I'm testing "simple_demo" -> signaturevs2010 ...
    using (Signature new_signature = AddSiganture(pdf_page, sub_filter))
    {
    // Set filter and subfilter for the new signature.
    // ...
    String cert_file_path = input_path + "foxit_all.pfx";
    byte[] cert_file_password = Encoding.ASCII.GetBytes("123456");
    new_signature.StartSign(cert_file_path, cert_file_password,Signature.DigestAlgorithm.e_DigestSHA1, signed_pdf_path, IntPtr.Zero, null);

    StartSign supports only path of .pfx, and not support X509Certificate2, Is there any way to do it?

    Thank you!
    Last edited by loende13; 12-12-2018, 11:51 AM.

  • #2
    Hi loende13,
    Yes, Foxit PDF SDK provide a abstract class named "foxit:df::SignatureCallback" You can implement your own algorithms with that.
    More details can be found at the sample code "SignatureCallbackImpl" and API reference: foxitpdfsdk_6_2_win/doc/html/classfoxit_1_1pdf_1_1_signature_callback.html
    Last edited by Alice_wei; 12-17-2018, 08:53 AM.

    Comment

    Working...
    X