Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client Verification using ASP.net

Status
Not open for further replies.

141980

Technical User
Jan 12, 2004
13
MY
is anyone know anything how to use asp.net in order to make digital signing,verifying,encryption.

do u have any sample code in order to do these tasks..if u have..please do reply this message..

thank u in advance
 
141: Haven't worked in that area, have you seen Walethers(2004) ASP.NET - Unleashed? You might consider getting that at the Book store - he goes into a lot of that kind of detail with plenty of references.

For example, I'm looking at the book now; he has a few topics listed in the Appendix on 'digital signatures'.

He lists some code used to generate digital signatures, q.v.,
Code:
<script runat="server">

Function Convert2ByteArray(srInput As String) As Byte()
 Dim intCounter As Integer
 Dim arrChar As Char()

 arrChar = strInput.ToCharArray()
 Dim arrByte(arrChar.Length-1) As Byte
 For intCounter = 0 to arrByte.Length-1
  arrByte(intCounter) = Convert.ToByte(arChar(intCounter()
 Next
 Return arrByte
End Function

Sub Button_Click(..)
 Dim arrInput As Byte()
 Dim objDSA As DSACryptoServiceProvider
 Dim strPublicKey As String
 Dim arrDigitalSignature As Byte()

 arrInput = Convert2ByteArray(txtInput.Text)
 objDSA = New DSACryptoSericeProvider()
 strPublicKey = objDSA.ToXMLString(False)
 arrDigitalSignature = objDSA.SignData(arrInput)
 txtSignature.Text = BitConverter.ToSTring(arrDigitalSignature)
 txtPublicKey.Text = strPublicKey
End Sub
</script>
...anyway, lots of materials in this particlur book; one of the best I've seen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top