Click here to Skip to main content
15,884,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using itextshpar.dll to attach digital signature to pdf.
Using epass2003 token which is having non-exportable private key.

Getting .cer file and converting it into .pfx file without privatekey.
Than login to token using below code.
C#
System.Security.Cryptography.CspParameters csp = new System.Security.Cryptography.CspParameters(1, "EnterSafe ePass2003 CSP v1.0");
csp.Flags = System.Security.Cryptography.CspProviderFlags.UseDefaultKeyContainer;

System.Security.Cryptography.RSACryptoServiceProvider rsa = new System.Security.Cryptography.RSACryptoServiceProvider(csp);

// Sign the data using the Smart Card CryptoGraphic Provider. 
byte[] sig = rsa.SignData(certData, "SHA256");
How to get private key from rsa and dont know how to attach it the code of itexshpar.dll function
Posted
Updated 7-May-14 22:29pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900