Ledent Francois wrote:

Hello,

I saw the sample of code to sign a PDF with the eID in java here:
http://homes.esat.kuleuven.be/~decockd/wiki/bin/view.cgi/Eid/EidForum#Is_there_a_free_applet_library_t

Is it be possible to make that in C# .NET 2.0 ? if yes :) how ?
It is possible to sign a PDF with iTextSharp (the .NET port of iText),
but that doesn't answer your question completely.

First issue: to create a digital signature, some Java specific classes
(in the java.security package) are used. In .NET you have to use an
external library such as BouncyCastle. For an example, see
http://www.nabble.com/Re:-iTextSharp-p609655.html

Second issue: the example in the link won't help you if you want
to sign a PDF using the eID. The signing has to be done on a
smart card reader and you need some software to establish the
communication with the eID and the smart card reader.
That's what the GoDot library does in the example.

...
BelpicCard scd = new BelpicCard("");
certs[0] = scd.getNonRepudiationCertificate();
...
byte[] signatureBytes = scd.generateNonRepudiationSignature(hash);
...

I don't know if there is a .NET version of the GoDot software,
but if you have already written some .NET code to access an eID,
you may already have the code to get the certificate and to sign
the hash generated by iText(Sharp).

I forward this to the iText mailing list for future reference.
If this answer is useful, please send a reply to this list.
br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to