Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all ,
Can any one tell me how to implement digital signing in c#.neT.


Thanks,
MOHAMMAD SIDDIQALI.
Posted
Updated 20-Jul-16 22:59pm
Comments
Pravin Patil, Mumbai 13-Sep-11 6:34am    
Be specific and come again....

Digital singing (under the Cryptography) is a broad area. So what you exactly want to do with signing?

When comes to Hashing, MACs and DSs, all are doing somewhat (not exactly) similar job. Using under different scenarios. So please clarify your exact requirement.

Updated my comment.

You need a hash to digitally sign a document. Because digital signatures are created from hash.

C#
SHA1 mySha1 = new SHA1CryptoServiceProvider();
byte[] hash = mySha1 .ComputeHash(byte_array);


Make sure to have your document in a byte array. If it's larger one you have to think about a better implementation.

Create a digital signature using generated Hash. Have a look at DSACryptoServiceProvider. Then with the received data verify the signature and deals with the data as you wish.
 
Share this answer
 
v2
Hi Coding Lover.

*Thanks for very quick response.I want to apply digital signature for uploading confidential documents.
*My client have number of users for his site and,When ever they upload the document digital signature should be applied for the document.Hope you have understood it and i will be waiting for your response.


Thanks,
MOHAMMAD SIDDIQALI.
 
Share this answer
 
Comments
CodingLover 13-Sep-11 6:56am    
I have updated my previous comment. Have a look at it!

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